mercurial/util.py
changeset 30988 d194f0dba7ac
parent 30975 22fbca1d11ed
child 31074 2912b06905dc
--- a/mercurial/util.py	Wed Feb 15 16:29:58 2017 -0800
+++ b/mercurial/util.py	Thu Feb 16 17:30:35 2017 +0530
@@ -73,7 +73,7 @@
 # destined stdout with a pipe destined stdout (e.g. pager), we want line
 # buffering
 if isatty(stdout):
-    stdout = os.fdopen(stdout.fileno(), 'wb', 1)
+    stdout = os.fdopen(stdout.fileno(), pycompat.sysstr('wb'), 1)
 
 if pycompat.osname == 'nt':
     from . import windows as platform