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>
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 @@
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 @@
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)