mercurial/commandserver.py
changeset 30924 48dea083f66d
parent 30891 b1b36c6499c2
child 32236 c8b9943c07eb
--- a/mercurial/commandserver.py	Thu Feb 09 15:20:41 2017 -0500
+++ b/mercurial/commandserver.py	Mon Feb 13 20:06:38 2017 +0530
@@ -304,8 +304,8 @@
     ui.flush()
     newfiles = []
     nullfd = os.open(os.devnull, os.O_RDWR)
-    for f, sysf, mode in [(ui.fin, util.stdin, 'rb'),
-                          (ui.fout, util.stdout, 'wb')]:
+    for f, sysf, mode in [(ui.fin, util.stdin, pycompat.sysstr('rb')),
+                          (ui.fout, util.stdout, pycompat.sysstr('wb'))]:
         if f is sysf:
             newfd = os.dup(f.fileno())
             os.dup2(nullfd, f.fileno())