diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-10-27 14:55:20 -0400 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-10-27 14:55:20 -0400 |
commit | aaa5789ba792a3b268effbf4beaae4c93525b0dc (patch) | |
tree | 338319dad71d463140cd87d82978403fd557d198 /b4/mbox.py | |
parent | 1b4913f371f5296292abbc608d0bbfe172cb6739 (diff) | |
download | b4-aaa5789ba792a3b268effbf4beaae4c93525b0dc.tar.gz |
Fix a crasher discovered in testing
Don't crash on incomplete threads when trying to carry over previous
trailers.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Diffstat (limited to 'b4/mbox.py')
-rw-r--r-- | b4/mbox.py | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -494,12 +494,14 @@ def main(cmdargs): threadmbox = b4.get_pi_thread_by_msgid(msgid, savefile, useproject=cmdargs.useproject, nocache=cmdargs.nocache) if threadmbox is None: + os.unlink(savefile) return else: if os.path.exists(cmdargs.localmbox): threadmbox = cmdargs.localmbox else: logger.critical('Mailbox %s does not exist', cmdargs.localmbox) + os.unlink(savefile) sys.exit(1) if threadmbox and cmdargs.checknewer: |