aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/run_tests/jobset.py
diff options
context:
space:
mode:
authorGravatar Mark D. Roth <roth@google.com>2016-07-14 13:58:42 -0700
committerGravatar Mark D. Roth <roth@google.com>2016-07-14 13:58:42 -0700
commitef31ba1e03ad55b0c46b5dd8b5ed38eec555412b (patch)
treeb9d4138c26b66621a003ee7552af01ee8e5d237e /tools/run_tests/jobset.py
parentdba5d2708c6d59a73b65d378440dc64b3af2b873 (diff)
parent1198da0b5c95b8444e4f282349f5d1f47db76525 (diff)
Merge remote-tracking branch 'upstream/master' into handshake_api
Diffstat (limited to 'tools/run_tests/jobset.py')
-rwxr-xr-xtools/run_tests/jobset.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/run_tests/jobset.py b/tools/run_tests/jobset.py
index 3999537c40..b6fb6318e0 100755
--- a/tools/run_tests/jobset.py
+++ b/tools/run_tests/jobset.py
@@ -29,6 +29,8 @@
"""Run a group of subprocesses and then finish."""
+from __future__ import print_function
+
import multiprocessing
import os
import platform
@@ -123,8 +125,8 @@ def message(tag, msg, explanatory_text=None, do_newline=False):
try:
if platform_string() == 'windows' or not sys.stdout.isatty():
if explanatory_text:
- print explanatory_text
- print '%s: %s' % (tag, msg)
+ print(explanatory_text)
+ print('%s: %s' % (tag, msg))
return
sys.stdout.write('%s%s%s\x1b[%d;%dm%s\x1b[0m: %s%s' % (
_BEGINNING_OF_LINE,
@@ -368,7 +370,7 @@ class Jobset(object):
self._travis,
self._add_env)
self._running.add(job)
- if not self.resultset.has_key(job.GetSpec().shortname):
+ if job.GetSpec().shortname not in self.resultset:
self.resultset[job.GetSpec().shortname] = []
return True