Mercurial > hg
diff hgext/remotefilelog/basepack.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 | 9769e0f6ffe0 |
children | 9fcf8084ada8 |
line wrap: on
line diff
--- a/hgext/remotefilelog/basepack.py Tue Nov 13 18:08:17 2018 +0300 +++ b/hgext/remotefilelog/basepack.py Tue Nov 13 18:08:55 2018 +0300 @@ -373,8 +373,8 @@ suffix=self.PACKSUFFIX + '-tmp') self.idxfp, self.idxpath = opener.mkstemp( suffix=self.INDEXSUFFIX + '-tmp') - self.packfp = os.fdopen(self.packfp, r'w+') - self.idxfp = os.fdopen(self.idxfp, r'w+') + self.packfp = os.fdopen(self.packfp, r'wb+') + self.idxfp = os.fdopen(self.idxfp, r'wb+') self.sha = hashlib.sha1() self._closed = False