diff options
author | Paul Burton <paul.burton@imgtec.com> | 2016-09-27 16:03:50 +0100 |
---|---|---|
committer | sjg <sjg@chromium.org> | 2016-10-09 09:30:32 -0600 |
commit | a920a17b2f418535870788ae81234dc6b8aa6661 (patch) | |
tree | 2986de030de65467a4830c6fafb79d5e142b7729 /tools/patman/patman.py | |
parent | 12e5476df33a24ff781e6f78404792e4b8596c28 (diff) |
patman: Make print statements python 3.x safe
In python 3.x, print must be used as a function call. Convert all print
statements to the function call style, importing from __future__ where
we print with no trailing newline or print to a file object.
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/patman/patman.py')
-rwxr-xr-x | tools/patman/patman.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/patman/patman.py b/tools/patman/patman.py index fe50eb4d5c8..fdbee67f559 100755 --- a/tools/patman/patman.py +++ b/tools/patman/patman.py @@ -93,11 +93,11 @@ elif options.test: suite.run(result) # TODO: Surely we can just 'print' result? - print result + print(result) for test, err in result.errors: - print err + print(err) for test, err in result.failures: - print err + print(err) # Called from git with a patch filename as argument # Printout a list of additional CC recipients for this patch @@ -110,7 +110,7 @@ elif options.cc_cmd: for cc in match.group(2).split(', '): cc = cc.strip() if cc: - print cc + print(cc) fd.close() elif options.full_help: @@ -166,12 +166,12 @@ else: options.dry_run, not options.ignore_bad_tags, cc_file, in_reply_to=options.in_reply_to, thread=options.thread) else: - print col.Color(col.RED, "Not sending emails due to errors/warnings") + print(col.Color(col.RED, "Not sending emails due to errors/warnings")) # For a dry run, just show our actions as a sanity check if options.dry_run: series.ShowActions(args, cmd, options.process_tags) if not its_a_go: - print col.Color(col.RED, "Email would not be sent") + print(col.Color(col.RED, "Email would not be sent")) os.remove(cc_file) |