mirror of
https://xff.cz/git/u-boot/
synced 2025-09-02 17:22:22 +02:00
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>
This commit is contained in:
@@ -53,11 +53,10 @@ def Print(text='', newline=True, colour=None):
|
|||||||
if colour:
|
if colour:
|
||||||
col = Color()
|
col = Color()
|
||||||
text = col.Color(colour, text)
|
text = col.Color(colour, text)
|
||||||
print(text, end='')
|
|
||||||
if newline:
|
if newline:
|
||||||
print()
|
print(text)
|
||||||
else:
|
else:
|
||||||
sys.stdout.flush()
|
print(text, end='', flush=True)
|
||||||
|
|
||||||
def SetPrintTestMode():
|
def SetPrintTestMode():
|
||||||
"""Go into test mode, where all printing is recorded"""
|
"""Go into test mode, where all printing is recorded"""
|
||||||
|
Reference in New Issue
Block a user