Show More
@@ -232,12 +232,12 b' class histpacktests(unittest.TestCase):' | |||||
232 |
|
232 | |||
233 | def testBadVersionThrows(self): |
|
233 | def testBadVersionThrows(self): | |
234 | pack = self.createPack() |
|
234 | pack = self.createPack() | |
235 | path = pack.path + '.histpack' |
|
235 | path = pack.path + b'.histpack' | |
236 | with open(path) as f: |
|
236 | with open(path, 'rb') as f: | |
237 | raw = f.read() |
|
237 | raw = f.read() | |
238 | raw = struct.pack('!B', 255) + raw[1:] |
|
238 | raw = struct.pack('!B', 255) + raw[1:] | |
239 | os.chmod(path, os.stat(path).st_mode | stat.S_IWRITE) |
|
239 | os.chmod(path, os.stat(path).st_mode | stat.S_IWRITE) | |
240 | with open(path, 'w+') as f: |
|
240 | with open(path, 'wb+') as f: | |
241 | f.write(raw) |
|
241 | f.write(raw) | |
242 |
|
242 | |||
243 | try: |
|
243 | try: |
General Comments 0
You need to be logged in to leave comments.
Login now