diff options
Diffstat (limited to 'python/mach_bootstrap.py')
-rw-r--r-- | python/mach_bootstrap.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/python/mach_bootstrap.py b/python/mach_bootstrap.py index 5dd1077c923..049dff4b7e7 100644 --- a/python/mach_bootstrap.py +++ b/python/mach_bootstrap.py @@ -104,13 +104,22 @@ def _process_exec(args): if process.returncode: print('"%s" failed with error code %d:' % ('" "'.join(args), process.returncode)) + if sys.version_info >= (3, 0): + stdout = sys.stdout.buffer + else: + stdout = sys.stdout + print('Output:') out.seek(0) - shutil.copyfileobj(out, sys.stdout) + stdout.flush() + shutil.copyfileobj(out, stdout) + stdout.flush() print('Error:') err.seek(0) - shutil.copyfileobj(err, sys.stdout) + stdout.flush() + shutil.copyfileobj(err, stdout) + stdout.flush() sys.exit(1) |