aboutsummaryrefslogtreecommitdiff
path: root/tools/patman/control.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-01-29 14:14:17 -0700
committerSimon Glass <sjg@chromium.org>2022-02-09 12:30:13 -0700
commit252ac589969acbc4c17379a4e862a18e1518d12d (patch)
treec17e36e0f9590e6de59f812066e6649c22be0000 /tools/patman/control.py
parent82e0e732ee2cf6d0e125aeb7ed7de69711f35ec8 (diff)
downloadu-boot-252ac589969acbc4c17379a4e862a18e1518d12d.zip
u-boot-252ac589969acbc4c17379a4e862a18e1518d12d.tar.gz
u-boot-252ac589969acbc4c17379a4e862a18e1518d12d.tar.bz2
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/control.py')
-rw-r--r--tools/patman/control.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/patman/control.py b/tools/patman/control.py
index cea4f3e..b403823 100644
--- a/tools/patman/control.py
+++ b/tools/patman/control.py
@@ -50,7 +50,7 @@ def prepare_patches(col, branch, count, start, end, ignore_binary, signoff):
if not count:
str = 'No commits found to process - please use -c flag, or run:\n' \
' git branch --set-upstream-to remote/branch'
- sys.exit(col.Color(col.RED, str))
+ sys.exit(col.build(col.RED, str))
# Read the metadata from the commits
to_do = count - end
@@ -143,13 +143,13 @@ def email_patches(col, series, cover_fname, patch_files, process_tags, its_a_go,
cc_file, in_reply_to=in_reply_to, thread=thread,
smtp_server=smtp_server)
else:
- print(col.Color(col.RED, "Not sending emails due to errors/warnings"))
+ print(col.build(col.RED, "Not sending emails due to errors/warnings"))
# For a dry run, just show our actions as a sanity check
if dry_run:
series.ShowActions(patch_files, cmd, process_tags)
if not its_a_go:
- print(col.Color(col.RED, "Email would not be sent"))
+ print(col.build(col.RED, "Email would not be sent"))
os.remove(cc_file)