diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-10-02 08:31:41 -0400 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-10-02 08:33:17 -0400 |
commit | ba3785ab469f557328972dfa3cfd30029d0d5f0a (patch) | |
tree | c7b45675b99cb146555c911c8521100021909d79 | |
parent | ab2ce66afa3d334933c5161fca74de433c0efdc4 (diff) | |
download | b4-ba3785ab469f557328972dfa3cfd30029d0d5f0a.tar.gz |
Don't crash when no valid patches are found
Error out when we don't find any patches in an mbox when trying to diff
series.
Reported-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rw-r--r-- | b4/diff.py | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -102,6 +102,9 @@ def diff_mboxes(cmdargs): lmbx = b4.LoreMailbox() for key, msg in mbx.items(): lmbx.add_message(msg) + if len(lmbx.series) < 1: + logger.critical('No valid patches found in %s', mboxfile) + sys.exit(1) if len(lmbx.series) > 1: logger.critical('More than one series version in %s, will use latest', mboxfile) |