소스 검색

Merge "Flush stderr on Windows"

Sebastian Schuberth 7 년 전
부모
커밋
a6515fb952
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  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