mercurial/httppeer.py
changeset 30924 48dea083f66d
parent 30763 a520aefb96f1
child 32002 bf855efe5664
--- a/mercurial/httppeer.py	Thu Feb 09 15:20:41 2017 -0500
+++ b/mercurial/httppeer.py	Mon Feb 13 20:06:38 2017 +0530
@@ -20,6 +20,7 @@
     bundle2,
     error,
     httpconnection,
+    pycompat,
     statichttprepo,
     url,
     util,
@@ -327,7 +328,7 @@
         try:
             # dump bundle to disk
             fd, filename = tempfile.mkstemp(prefix="hg-bundle-", suffix=".hg")
-            fh = os.fdopen(fd, "wb")
+            fh = os.fdopen(fd, pycompat.sysstr("wb"))
             d = fp.read(4096)
             while d:
                 fh.write(d)