diff options
author | Simon Glass | 2020-04-09 15:08:39 -0600 |
---|---|---|
committer | Simon Glass | 2020-04-21 06:33:47 -0600 |
commit | a84eb1617997d71bdec1f4152536bd8ecba82e87 (patch) | |
tree | b46d69597578b0e8fc08dd2acda07e1ab147b4ca /tools/patman/terminal.py | |
parent | 9ef0ceb7308c710a54bc900ea57a233c9e716b2d (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/terminal.py')
-rw-r--r-- | tools/patman/terminal.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/patman/terminal.py b/tools/patman/terminal.py index 7a3b658b00e..6541fa8f410 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""" |