##// END OF EJS Templates
py3: make sure we open the file in bytes mode...
Pulkit Goyal -
r35967:80e5210d default
parent child Browse files
Show More
@@ -12,7 +12,7 b''
12 > topics = set()
12 > topics = set()
13 > topicre = re.compile(br':hg:`help ([a-z0-9\-.]+)`')
13 > topicre = re.compile(br':hg:`help ([a-z0-9\-.]+)`')
14 > for fname in sys.argv:
14 > for fname in sys.argv:
15 > with open(fname) as f:
15 > with open(fname, 'rb') as f:
16 > topics.update(m.group(1) for m in topicre.finditer(f.read()))
16 > topics.update(m.group(1) for m in topicre.finditer(f.read()))
17 > for s in sorted(topics):
17 > for s in sorted(topics):
18 > print(s)
18 > print(s)
@@ -138,7 +138,7 b' Verify line trimming of custom conflict '
138
138
139 $ hg up -q --clean .
139 $ hg up -q --clean .
140 $ $PYTHON <<EOF
140 $ $PYTHON <<EOF
141 > fp = open('logfile', 'w')
141 > fp = open('logfile', 'wb')
142 > fp.write(b'12345678901234567890123456789012345678901234567890' +
142 > fp.write(b'12345678901234567890123456789012345678901234567890' +
143 > b'1234567890') # there are 5 more columns for 80 columns
143 > b'1234567890') # there are 5 more columns for 80 columns
144 >
144 >
General Comments 0
You need to be logged in to leave comments. Login now