From a84eb1617997d71bdec1f4152536bd8ecba82e87 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 9 Apr 2020 15:08:39 -0600 Subject: [PATCH] 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 --- 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 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""" -- 2.25.1