mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-06-23 07:01:38 +00: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:
parent
9ef0ceb730
commit
a84eb16179
1 changed files with 2 additions and 3 deletions
|
@ -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"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue