[PATCH 11/22] patman: Update flushing Print() for Python 3
Simon Glass
sjg at chromium.org
Sun Apr 5 17:21:20 CEST 2020
This does not seem to work on Python 3. Update the code to use the
built-in support.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
tools/patman/terminal.py | 5 ++---
1 file 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"""
--
2.26.0.292.g33ef6b2f38-goog
More information about the U-Boot
mailing list