mercurial/debugcommands.py
changeset 30988 d194f0dba7ac
parent 30959 bd5694ce8beb
child 31024 0b8356705de6
--- a/mercurial/debugcommands.py	Wed Feb 15 16:29:58 2017 -0800
+++ b/mercurial/debugcommands.py	Thu Feb 16 17:30:35 2017 +0530
@@ -910,7 +910,7 @@
 
     def writetemp(contents):
         (fd, name) = tempfile.mkstemp(prefix="hg-debuginstall-")
-        f = os.fdopen(fd, "wb")
+        f = os.fdopen(fd, pycompat.sysstr("wb"))
         f.write(contents)
         f.close()
         return name