diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2023-04-19 16:08:58 -0400 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2023-04-19 16:08:58 -0400 |
commit | bfdf5b3b0835c8c351abbcd9b3b5268acf6545fa (patch) | |
tree | 04fcc43b4a64733a80cbeaecb69ff35df632ecdb | |
parent | 0e2c4e03e1c6b031b995e9f2fe57ce975fe360c7 (diff) | |
download | b4-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.py | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -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) |