mercurial/pure/osutil.py
changeset 30925 82f1ef8b4477
parent 30642 e995f00a9e9a
child 31644 f80d9ddc40f3
--- a/mercurial/pure/osutil.py	Mon Feb 13 20:06:38 2017 +0530
+++ b/mercurial/pure/osutil.py	Mon Feb 13 22:15:28 2017 +0530
@@ -338,7 +338,7 @@
                 _kernel32.CloseHandle(fh)
                 _raiseioerror(name)
 
-            f = os.fdopen(fd, mode, bufsize)
+            f = os.fdopen(fd, pycompat.sysstr(mode), bufsize)
             # unfortunately, f.name is '<fdopen>' at this point -- so we store
             # the name on this wrapper. We cannot just assign to f.name,
             # because that attribute is read-only.