summaryrefslogtreecommitdiff
path: root/tools/buildman
diff options
context:
space:
mode:
authorSimon Glass <[email protected]>2025-02-19 08:11:16 -0700
committerTom Rini <[email protected]>2025-02-21 08:24:37 -0600
commit6e628c221ebf19a869542d31187e3ac29dba20fb (patch)
tree34b3fc890f0f8574804c08edb3016e7f614b00cb /tools/buildman
parent8e233cca9d9b8876f60e8fa2a17eceda165e649e (diff)
tools: Fix pylint 3.3.4 errors
This newer pylint produces errors about variables possibly being used before being set. Adjust the code to pass these checks. Signed-off-by: Simon Glass <[email protected]> Reported-by: Tom Rini <[email protected]>
Diffstat (limited to 'tools/buildman')
-rw-r--r--tools/buildman/builder.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/buildman/builder.py b/tools/buildman/builder.py
index 2568e4e8423..23b1016d0f9 100644
--- a/tools/buildman/builder.py
+++ b/tools/buildman/builder.py
@@ -1095,14 +1095,13 @@ class Builder:
diff = result[name]
if name.startswith('_'):
continue
- if diff != 0:
- color = self.col.RED if diff > 0 else self.col.GREEN
+ colour = self.col.RED if diff > 0 else self.col.GREEN
msg = ' %s %+d' % (name, diff)
if not printed_target:
tprint('%10s %-15s:' % ('', result['_target']),
newline=False)
printed_target = True
- tprint(msg, colour=color, newline=False)
+ tprint(msg, colour=colour, newline=False)
if printed_target:
tprint()
if show_bloat:
@@ -1353,6 +1352,7 @@ class Builder:
for line in lines:
if not line:
continue
+ col = None
if line[0] == '+':
col = self.col.GREEN
elif line[0] == '-':