patman: Update flushing Print() for Python 3
This does not seem to work on Python 3. Update the code to use the
built-in support.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/tools/patman/terminal.py b/tools/patman/terminal.py
index 7a3b658..6541fa8 100644
--- a/tools/patman/terminal.py
+++ b/tools/patman/terminal.py
@@ -53,11 +53,10 @@
if colour:
col = Color()
text = col.Color(colour, text)
- print(text, end='')
if newline:
- print()
+ print(text)
else:
- sys.stdout.flush()
+ print(text, end='', flush=True)
def SetPrintTestMode():
"""Go into test mode, where all printing is recorded"""