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>
diff --git a/tools/patman/gitutil.py b/tools/patman/gitutil.py
index bb7c9e0..c0fe093 100644
--- a/tools/patman/gitutil.py
+++ b/tools/patman/gitutil.py
@@ -491,7 +491,7 @@
if raise_on_error:
raise OSError, msg
else:
- print col.Color(col.RED, msg)
+ print(col.Color(col.RED, msg))
return out_list
if lookup_name:
@@ -500,7 +500,7 @@
if raise_on_error:
raise ValueError, msg
else:
- print col.Color(col.RED, msg)
+ print(col.Color(col.RED, msg))
return out_list
for item in alias[lookup_name]:
todo = LookupEmail(item, alias, raise_on_error, level + 1)
@@ -508,7 +508,7 @@
if not new_item in out_list:
out_list.append(new_item)
- #print "No match for alias '%s'" % lookup_name
+ #print("No match for alias '%s'" % lookup_name)
return out_list
def GetTopLevel():