changeset 25040:6b8c48cfb85e

run-tests: write bytes to sys.stdout.buffer in python 3
author Augie Fackler <augie@google.com>
date Tue, 14 Apr 2015 16:02:49 -0400
parents 8505eb1bafb1
children 09c71e3da704
files tests/run-tests.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Tue Apr 14 15:59:59 2015 -0400
+++ b/tests/run-tests.py	Tue Apr 14 16:02:49 2015 -0400
@@ -1989,7 +1989,10 @@
         else:
             f = open(installerrs, 'rb')
             for line in f:
-                sys.stdout.write(line)
+                if sys.version_info[0] > 2:
+                    sys.stdout.buffer.write(line)
+                else:
+                    sys.stdout.write(line)
             f.close()
             sys.exit(1)
         os.chdir(self._testdir)