archival: ensure file mode for gzipfile is sysstr
Differential Revision: https://phab.mercurial-scm.org/D2672
--- a/mercurial/archival.py Sun Mar 04 16:06:10 2018 -0500
+++ b/mercurial/archival.py Sun Mar 04 16:06:27 2018 -0500
@@ -158,7 +158,8 @@
mode = mode[0:1]
if not fileobj:
fileobj = open(name, mode + 'b')
- gzfileobj = self.GzipFileWithTime(name, mode + 'b',
+ gzfileobj = self.GzipFileWithTime(name,
+ pycompat.sysstr(mode + 'b'),
zlib.Z_BEST_COMPRESSION,
fileobj, timestamp=mtime)
self.fileobj = gzfileobj