Explorar o código

Merge "Flush stderr on Windows"

Sebastian Schuberth %!s(int64=7) %!d(string=hai) anos
pai
achega
a6515fb952
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      repo

+ 4 - 0
repo

@@ -144,6 +144,10 @@ def _print(*objects, **kwargs):
   out = kwargs.get('file', sys.stdout)
   out.write(sep.join(objects) + end)
 
+  # On Windows stderr is buffered, so flush to maintain the order of error messages.
+  if out == sys.stderr and platform.system() == "Windows":
+    out.flush()
+
 
 # Python version check
 ver = sys.version_info