Skip to contentSkip to conversation

siggen: Fix handling of tainted sig files

PATCH New Richard Purdie 1 participant 1 message Jul 19, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 siggen: Fix handling of tainted sig files

The addition of some debugging code meant that comparisions between sig files with a taint and without a taint weren't working. Tweak the logic to avoid tracebacks if one side doesn't have a taint.

---
 lib/bb/siggen.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
lib/bb/siggen.py +2 -2
index f9c4798e3d..6a729f3b1e 100644
@@ -645,9 +645,9 @@ def compare_sigfiles(a, b, recursecb=None, color=False, collapsed=False):
     a_taint = a_data.get('taint', None)
     b_taint = b_data.get('taint', None)
     if a_taint != b_taint:
-        if a_taint.startswith('nostamp:'):
+        if a_taint and a_taint.startswith('nostamp:'):
             a_taint = a_taint.replace('nostamp:', 'nostamp(uuid4):')
-        if b_taint.startswith('nostamp:'):
+        if b_taint and b_taint.startswith('nostamp:'):
             b_taint = b_taint.replace('nostamp:', 'nostamp(uuid4):')
         output.append(color_format("{color_title}Taint (by forced/invalidated task) changed{color_default} from %s to %s") % (a_taint, b_taint))
 
Signature · 1 line
2.20.1