diff mercurial/pure/osutil.py @ 30945:82f1ef8b4477

py3: convert the mode argument of os.fdopen to unicodes (2 of 2)
author Pulkit Goyal <7895pulkit@gmail.com>
date Mon, 13 Feb 2017 22:15:28 +0530
parents e995f00a9e9a
children f80d9ddc40f3
line wrap: on
line diff
--- 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.