diff options
author | Sebastian Schuberth <sschuberth@gmail.com> | 2018-07-13 15:48:36 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-07-13 15:48:36 +0000 |
commit | a6515fb952ab31a820288ce342e31d2917d0a06c (patch) | |
tree | afaa56f02f8fa3fbb5c2412e374829e6d5a307f0 | |
parent | 993dcacd17c6ea0d9c366c1bfc3e9579dfa19b44 (diff) | |
parent | a9399846faa077a8eb15aedb8b498cba7cf3aeba (diff) | |
download | git-repo-a6515fb952ab31a820288ce342e31d2917d0a06c.tar.gz |
Merge "Flush stderr on Windows"
-rwxr-xr-x | repo | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -144,6 +144,10 @@ def _print(*objects, **kwargs): | |||
144 | out = kwargs.get('file', sys.stdout) | 144 | out = kwargs.get('file', sys.stdout) |
145 | out.write(sep.join(objects) + end) | 145 | out.write(sep.join(objects) + end) |
146 | 146 | ||
147 | # On Windows stderr is buffered, so flush to maintain the order of error messages. | ||
148 | if out == sys.stderr and platform.system() == "Windows": | ||
149 | out.flush() | ||
150 | |||
147 | 151 | ||
148 | # Python version check | 152 | # Python version check |
149 | ver = sys.version_info | 153 | ver = sys.version_info |