aboutsummaryrefslogtreecommitdiff
path: root/tools/patman/series.py
diff options
context:
space:
mode:
authorSimon Glass2022-01-29 14:14:17 -0700
committerSimon Glass2022-02-09 12:30:13 -0700
commit252ac589969acbc4c17379a4e862a18e1518d12d (patch)
treec17e36e0f9590e6de59f812066e6649c22be0000 /tools/patman/series.py
parent82e0e732ee2cf6d0e125aeb7ed7de69711f35ec8 (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/series.py')
-rw-r--r--tools/patman/series.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/patman/series.py b/tools/patman/series.py
index 27dd3e1a7ed..891f2785342 100644
--- a/tools/patman/series.py
+++ b/tools/patman/series.py
@@ -118,11 +118,11 @@ class Series(dict):
# TODO: Colour the patches according to whether they passed checks
for upto in range(len(args)):
commit = self.commits[upto]
- print(col.Color(col.GREEN, ' %s' % args[upto]))
+ print(col.build(col.GREEN, ' %s' % args[upto]))
cc_list = list(self._generated_cc[commit.patch])
for email in sorted(set(cc_list) - to_set - cc_set):
if email == None:
- email = col.Color(col.YELLOW, "<alias '%s' not found>"
+ email = col.build(col.YELLOW, "<alias '%s' not found>"
% tag)
if email:
print(' Cc: ', email)
@@ -227,13 +227,13 @@ class Series(dict):
else:
if version > 1:
str = 'Change log missing for v%d' % version
- print(col.Color(col.RED, str))
+ print(col.build(col.RED, str))
for version in changes_copy:
str = 'Change log for unknown version v%d' % version
- print(col.Color(col.RED, str))
+ print(col.build(col.RED, str))
elif self.changes:
str = 'Change log exists, but no version is set'
- print(col.Color(col.RED, str))
+ print(col.build(col.RED, str))
def MakeCcFile(self, process_tags, cover_fname, warn_on_error,
add_maintainers, limit):
@@ -271,7 +271,7 @@ class Series(dict):
dir_list = [os.path.join(gitutil.get_top_level(), 'scripts')]
cc += get_maintainer.get_maintainer(dir_list, commit.patch)
for x in set(cc) & set(settings.bounces):
- print(col.Color(col.YELLOW, 'Skipping "%s"' % x))
+ print(col.build(col.YELLOW, 'Skipping "%s"' % x))
cc = list(set(cc) - set(settings.bounces))
if limit is not None:
cc = cc[:limit]