From: Simon Glass Date: Thu, 9 Apr 2020 21:08:39 +0000 (-0600) Subject: patman: Update flushing Print() for Python 3 X-Git-Url: http://git.dujemihanovic.xyz/img/sics.gif?a=commitdiff_plain;h=a84eb1617997d71bdec1f4152536bd8ecba82e87;p=u-boot.git 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 --- 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"""