aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2023-04-19 16:08:58 -0400
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2023-04-19 16:08:58 -0400
commitbfdf5b3b0835c8c351abbcd9b3b5268acf6545fa (patch)
tree04fcc43b4a64733a80cbeaecb69ff35df632ecdb
parent0e2c4e03e1c6b031b995e9f2fe57ce975fe360c7 (diff)
downloadb4-bfdf5b3b0835c8c351abbcd9b3b5268acf6545fa.tar.gz
ez: better fix for "no follow-up trailers" condition
Previous fix for bug 217331 didn't properly handle the situation when trailers were sent to the cover letter, so implement a better fix. Fixes: 00e423af1a (ez-trailers: don't crash when there are no follow-ups received) Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217331 Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rw-r--r--b4/ez.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/b4/ez.py b/b4/ez.py
index d9a88ec..47fafc1 100644
--- a/b4/ez.py
+++ b/b4/ez.py
@@ -887,11 +887,10 @@ def update_trailers(cmdargs: argparse.Namespace) -> None:
lser = bbox.get_series(sloppytrailers=cmdargs.sloppytrailers)
mismatches = list(lser.trailer_mismatches)
for lmsg in lser.patches[1:]:
- if not lmsg.followup_trailers:
- logger.debug('No follow-up trailers found for: %s', lmsg.subject)
- continue
- addtrailers = list(lmsg.followup_trailers)
- if lser.has_cover and len(lser.patches[0].followup_trailers):
+ addtrailers = list()
+ if lmsg.followup_trailers:
+ addtrailers += list(lmsg.followup_trailers)
+ if lser.has_cover and lser.patches[0].followup_trailers:
addtrailers += list(lser.patches[0].followup_trailers)
if not addtrailers:
logger.debug('No new follow-up trailers to add to: %s', lmsg.subject)