diff options
author | Simon Glass | 2022-01-29 14:14:17 -0700 |
---|---|---|
committer | Simon Glass | 2022-02-09 12:30:13 -0700 |
commit | 252ac589969acbc4c17379a4e862a18e1518d12d (patch) | |
tree | c17e36e0f9590e6de59f812066e6649c22be0000 /tools/patman/gitutil.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/gitutil.py')
-rw-r--r-- | tools/patman/gitutil.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/patman/gitutil.py b/tools/patman/gitutil.py index 86972973249..ceaf2ce1504 100644 --- a/tools/patman/gitutil.py +++ b/tools/patman/gitutil.py @@ -404,7 +404,7 @@ def check_suppress_cc_config(): if suppresscc == 'all' or suppresscc == 'cccmd': col = terminal.Color() - print((col.Color(col.RED, "error") + + print((col.build(col.RED, "error") + ": git config sendemail.suppresscc set to %s\n" % (suppresscc)) + " patman needs --cc-cmd to be run to set the cc list.\n" + " Please run:\n" + @@ -577,14 +577,14 @@ def lookup_email(lookup_name, alias=None, warn_on_error=True, level=0): if warn_on_error: raise OSError(msg) else: - print(col.Color(col.RED, msg)) + print(col.build(col.RED, msg)) return out_list if lookup_name: if not lookup_name in alias: msg = "Alias '%s' not found" % lookup_name if warn_on_error: - print(col.Color(col.RED, msg)) + print(col.build(col.RED, msg)) return out_list for item in alias[lookup_name]: todo = lookup_email(item, alias, warn_on_error, level + 1) |