Skip to content

Commit 72ce9fd

Browse files
committed
zip() throws away lines from the end
1 parent 23625a7 commit 72ce9fd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

update-ends.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,8 @@ def has_end(filename, template):
6464
with open(filename, 'r') as f:
6565
# get the last linecount lines
6666
filelines = collections.deque(f, maxlen=linecount)
67-
templatelines = template.rstrip('\n').split('\n')
6867

69-
for templateline, fileline in zip(templatelines, filelines):
68+
for templateline, fileline in zip(template.split('\n'), filelines):
7069
if '{' not in templateline:
7170
# It doesn't contain formatting, we can do something with it.
7271
if templateline.strip() != fileline.strip():

0 commit comments

Comments
 (0)