From df10eb41f37689ae6732c63770e95bc43bab22fd Mon Sep 17 00:00:00 2001 From: Konstantin Ryabitsev Date: Fri, 21 May 2021 11:45:36 -0400 Subject: Don't crash on absent cover letter We may not have an lmsg[0], so check for that. Signed-off-by: Konstantin Ryabitsev --- b4/mbox.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b4/mbox.py b/b4/mbox.py index 337875b..de2cfc6 100644 --- a/b4/mbox.py +++ b/b4/mbox.py @@ -152,7 +152,7 @@ def make_am(msgs, cmdargs, msgid): warned = False for lmsg in lser.patches: # Only check cover letter or first patch - if lmsg.counter > 1: + if not lmsg or lmsg.counter > 1: continue for trailer in list(lmsg.followup_trailers): if trailer[0].lower() == 'obsoleted-by': -- cgit v1.2.3