From 857797f0bc1809e8af8ae5a1a31e3551742ee31b Mon Sep 17 00:00:00 2001 From: Konstantin Ryabitsev Date: Mon, 6 Jul 2020 18:06:30 -0400 Subject: Fix crash when -c used with incomplete series Return early if we don't have a cover letter or patch 1/X to use as basis for the subject-based query. Reported-by: Christian Brauner Signed-off-by: Konstantin Ryabitsev --- b4/mbox.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/b4/mbox.py b/b4/mbox.py index d40c3df..2391405 100644 --- a/b4/mbox.py +++ b/b4/mbox.py @@ -365,6 +365,10 @@ def get_extra_series(mboxfile, direction=1, wantvers=None, nocache=False): # A patch/series without a cover letter base_msg = msg + if base_msg is None: + logger.debug('Could not find cover of 1st patch in mbox') + mbx.close() + return # Get subject info from base_msg again lsub = b4.LoreSubject(base_msg['Subject']) if not len(lsub.prefixes): -- cgit v1.2.3