From 31c531b2506196df20defb6977776ab0231a7201 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Tue, 30 Jul 2013 18:29:06 +0000 Subject: [PATCH] Make subunit2html.py Py3k compatible. * modules/jenkins/files/slave_scripts/subunit2html.py: Since some projects call this script from under tox, in a py33 environment it won't work as intended. Correct multiple instances of print as a statement rather than as a function. Change-Id: I179d6aee976b033a45f483fd92f058a6079f8f46 --- modules/jenkins/files/slave_scripts/subunit2html.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/jenkins/files/slave_scripts/subunit2html.py b/modules/jenkins/files/slave_scripts/subunit2html.py index efc2f75e4a..9e5660e0d7 100755 --- a/modules/jenkins/files/slave_scripts/subunit2html.py +++ b/modules/jenkins/files/slave_scripts/subunit2html.py @@ -481,7 +481,7 @@ class HtmlOutput(testtools.TestResult): self.result.append((2, test, output, _exc_str)) def addFailure(self, test, err): - print test + print(test) self.failure_count += 1 _exc_str = self.formatErr(err) output = test.shortDescription() @@ -619,7 +619,7 @@ class HtmlOutput(testtools.TestResult): if hasattr(test, 'test'): test = test.test if test.__class__ == subunit.RemotedTestCase: - #print test._RemotedTestCase__description.rsplit('.', 1)[0] + #print(test._RemotedTestCase__description.rsplit('.', 1)[0]) cl = test._RemotedTestCase__description.rsplit('.', 1)[0] mod = cl.rsplit('.', 1)[0] cls = ClassInfoWrapper(cl, mod) @@ -709,7 +709,7 @@ class FileAccumulator(testtools.StreamResult): def main(): if len(sys.argv) < 2: - print "Need at least one argument: path to subunit log." + print("Need at least one argument: path to subunit log.") exit(1) subunit_file = sys.argv[1] if len(sys.argv) > 2: