mercurial/utils/procutil.py
changeset 43165 227ba1afcb65
parent 43115 4aa72cdf616f
child 43478 54f4d094bab1
child 43848 15a6c6783060
--- a/mercurial/utils/procutil.py	Mon Oct 07 21:21:16 2019 -0400
+++ b/mercurial/utils/procutil.py	Thu Oct 10 16:00:02 2019 +0200
@@ -53,7 +53,9 @@
     if pycompat.iswindows:
         # Windows doesn't support line buffering
         stdout = os.fdopen(stdout.fileno(), r'wb', 0)
-    else:
+    elif not pycompat.ispy3:
+        # on Python 3, stdout (sys.stdout.buffer) is already line buffered and
+        # buffering=1 is not handled in binary mode
         stdout = os.fdopen(stdout.fileno(), r'wb', 1)
 
 if pycompat.iswindows: