run-tests: write bytes to sys.stdout.buffer in python 3
authorAugie Fackler <augie@google.com>
Tue, 14 Apr 2015 16:02:49 -0400
changeset 25040 6b8c48cfb85e
parent 25039 8505eb1bafb1
child 25041 09c71e3da704
run-tests: write bytes to sys.stdout.buffer in python 3
tests/run-tests.py
--- 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)