diff options
author | Simon Glass <sjg@chromium.org> | 2022-01-29 14:14:17 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2022-02-09 12:30:13 -0700 |
commit | 252ac589969acbc4c17379a4e862a18e1518d12d (patch) | |
tree | c17e36e0f9590e6de59f812066e6649c22be0000 /tools/patman/tout.py | |
parent | 82e0e732ee2cf6d0e125aeb7ed7de69711f35ec8 (diff) |
patman: Rename Color() method to build()
This method has the same name as its class which is confusing. It is also
annoying when searching the code.
It builds a string with a colour, so rename it to build().
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/patman/tout.py')
-rw-r--r-- | tools/patman/tout.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/patman/tout.py b/tools/patman/tout.py index 7eb555aaaea..ff0fd92afcc 100644 --- a/tools/patman/tout.py +++ b/tools/patman/tout.py @@ -64,7 +64,7 @@ def progress(msg, warning=False, trailer='...'): _progress = msg + trailer if stdout_is_tty: col = _color.YELLOW if warning else _color.GREEN - _stdout.write('\r' + _color.Color(col, _progress)) + _stdout.write('\r' + _color.build(col, _progress)) _stdout.flush() in_progress = True else: @@ -82,7 +82,7 @@ def _output(level, msg, color=None): if verbose >= level: clear_progress() if color: - msg = _color.Color(color, msg) + msg = _color.build(color, msg) if level < NOTICE: print(msg, file=sys.stderr) else: |