Show More
@@ -10,7 +10,7 Test applying context diffs | |||||
10 | > fp = open(path, 'wb') |
|
10 | > fp = open(path, 'wb') | |
11 | > for i, pattern in enumerate(patterns): |
|
11 | > for i, pattern in enumerate(patterns): | |
12 | > count = int(pattern[0:-1]) |
|
12 | > count = int(pattern[0:-1]) | |
13 | > char = pattern[-1] + '\n' |
|
13 | > char = pattern[-1].encode('utf8') + b'\n' | |
14 | > if not lasteol and i == len(patterns) - 1: |
|
14 | > if not lasteol and i == len(patterns) - 1: | |
15 | > fp.write((char*count)[:-1]) |
|
15 | > fp.write((char*count)[:-1]) | |
16 | > else: |
|
16 | > else: |
@@ -8,7 +8,7 | |||||
8 | > fp = open(path, 'wb') |
|
8 | > fp = open(path, 'wb') | |
9 | > for pattern in patterns: |
|
9 | > for pattern in patterns: | |
10 | > count = int(pattern[0:-1]) |
|
10 | > count = int(pattern[0:-1]) | |
11 | > char = pattern[-1] + '\n' |
|
11 | > char = pattern[-1].encode('utf8') + b'\n' | |
12 | > fp.write(char*count) |
|
12 | > fp.write(char*count) | |
13 | > fp.close() |
|
13 | > fp.close() | |
14 | > EOF |
|
14 | > EOF |
General Comments 0
You need to be logged in to leave comments.
Login now