Patchwork [1,of,2] run-tests: avoid printing extra newlines from install log

login
register
mail settings
Submitter Gregory Szorc
Date Feb. 7, 2015, 12:33 a.m.
Message ID <a758be135cf445549297.1423269195@gps-mbp.local>
Download mbox | patch
Permalink /patch/7730/
State Accepted
Headers show

Comments

Gregory Szorc - Feb. 7, 2015, 12:33 a.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1423268102 28800
#      Fri Feb 06 16:15:02 2015 -0800
# Node ID a758be135cf4455492970d4e8c0bc29b60562e41
# Parent  975f6586908de6526bf5165d09f8622437a682e5
run-tests: avoid printing extra newlines from install log

If an installation error occurs, we print the install log. Before,
output had extra newlines because we were using "print" on data that was
already newline terminated.

Patch

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -1869,9 +1869,9 @@  class TestRunner(object):
                 os.remove(installerrs)
         else:
             f = open(installerrs, 'rb')
             for line in f:
-                print line
+                sys.stdout.write(line)
             f.close()
             sys.exit(1)
         os.chdir(self._testdir)