patman: Allow disabling 'bright' mode with Print output
At present all text is marked bright, which makes it stand out on the terminal. Add a way to disable that, as is done with the Color class. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
6bb74de7ed
commit
3c541c0836
@ -122,7 +122,7 @@ def TrimAsciiLen(text, size):
|
|||||||
return out
|
return out
|
||||||
|
|
||||||
|
|
||||||
def Print(text='', newline=True, colour=None, limit_to_line=False):
|
def Print(text='', newline=True, colour=None, limit_to_line=False, bright=True):
|
||||||
"""Handle a line of output to the terminal.
|
"""Handle a line of output to the terminal.
|
||||||
|
|
||||||
In test mode this is recorded in a list. Otherwise it is output to the
|
In test mode this is recorded in a list. Otherwise it is output to the
|
||||||
@ -140,7 +140,7 @@ def Print(text='', newline=True, colour=None, limit_to_line=False):
|
|||||||
else:
|
else:
|
||||||
if colour:
|
if colour:
|
||||||
col = Color()
|
col = Color()
|
||||||
text = col.Color(colour, text)
|
text = col.Color(colour, text, bright=bright)
|
||||||
if newline:
|
if newline:
|
||||||
print(text)
|
print(text)
|
||||||
last_print_len = None
|
last_print_len = None
|
||||||
|
Loading…
Reference in New Issue
Block a user