aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2021-05-21 11:45:36 -0400
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2021-05-21 11:45:36 -0400
commitdf10eb41f37689ae6732c63770e95bc43bab22fd (patch)
tree3db6d6ddd47aeac091a208c1928aee0cc1cf9af7
parent7a20dcf82257604586b29642d078194447d492b7 (diff)
downloadb4-df10eb41f37689ae6732c63770e95bc43bab22fd.tar.gz
Don't crash on absent cover letter
We may not have an lmsg[0], so check for that. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rw-r--r--b4/mbox.py2
1 files changed, 1 insertions, 1 deletions
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':