comparison hgext/remotefilelog/debugcommands.py @ 40614:aa588bf40a08

py3: add b suffix to make sure file is opened in bytes mode Differential Revision: https://phab.mercurial-scm.org/D5263
author Pulkit Goyal <pulkit@yandex-team.ru>
date Tue, 13 Nov 2018 18:08:55 +0300
parents 3fa4183e7803
children feae4d1f5e01
comparison
equal deleted inserted replaced
40613:9769e0f6ffe0 40614:aa588bf40a08
174 def _decompressblob(raw): 174 def _decompressblob(raw):
175 return zlib.decompress(raw) 175 return zlib.decompress(raw)
176 176
177 def parsefileblob(path, decompress): 177 def parsefileblob(path, decompress):
178 raw = None 178 raw = None
179 f = open(path, "r") 179 f = open(path, "rb")
180 try: 180 try:
181 raw = f.read() 181 raw = f.read()
182 finally: 182 finally:
183 f.close() 183 f.close()
184 184