From 10dcc9f8fe8bce21d3f3cf465070736da207fd75 Mon Sep 17 00:00:00 2001 From: Konstantin Ryabitsev Date: Fri, 21 May 2021 14:10:26 -0400 Subject: Handle partial reroll of series without cover A series may not have a cover letter, so properly handle that situation. Signed-off-by: Konstantin Ryabitsev --- b4/__init__.py | 3 +++ b4/mbox.py | 2 ++ 2 files changed, 5 insertions(+) (limited to 'b4') diff --git a/b4/__init__.py b/b4/__init__.py index fc79e7f..eed101a 100644 --- a/b4/__init__.py +++ b/b4/__init__.py @@ -273,6 +273,9 @@ class LoreMailbox: logger.debug('Reconstituting a partial reroll') at = 0 for patch in lser.patches: + if pser.patches[at] is None: + at += 1 + continue if patch is None: ppatch = copy.deepcopy(pser.patches[at]) ppatch.revision = lser.revision diff --git a/b4/mbox.py b/b4/mbox.py index de2cfc6..55b456a 100644 --- a/b4/mbox.py +++ b/b4/mbox.py @@ -577,6 +577,8 @@ def main(cmdargs): if not len(msgs): logger.critical('Could not find %s in %s', msgid, cmdargs.localmbox) sys.exit(1) + else: + msgs = in_mbx else: logger.critical('Mailbox %s does not exist', cmdargs.localmbox) sys.exit(1) -- cgit v1.2.3