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:31:41 -0400 |
commit | b34efebe5026567efad9cd71f308000504dd8e31 (patch) | |
tree | 7b44b74186ae795f520b34df9c8b5160cfdf5d27 | |
parent | 2368a6a3fd32be60ecc9ae2d45e0f608c5b77545 (diff) | |
download | b4-b34efebe5026567efad9cd71f308000504dd8e31.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
@@ -101,6 +101,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) |