summaryrefslogtreecommitdiff
path: root/tools/patman
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-04-09 15:08:39 -0600
committerSimon Glass <sjg@chromium.org>2020-04-21 06:33:47 -0600
commita84eb1617997d71bdec1f4152536bd8ecba82e87 (patch)
treeb46d69597578b0e8fc08dd2acda07e1ab147b4ca /tools/patman
parent9ef0ceb7308c710a54bc900ea57a233c9e716b2d (diff)
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>
Diffstat (limited to 'tools/patman')
-rw-r--r--tools/patman/terminal.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/patman/terminal.py b/tools/patman/terminal.py
index 7a3b658b00..6541fa8f41 100644
--- a/tools/patman/terminal.py
+++ b/tools/patman/terminal.py
@@ -53,11 +53,10 @@ def Print(text='', newline=True, colour=None):
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"""