summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-11-17 15:50:52 -0500
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-11-17 15:54:52 -0500
commit46b9e092457c2921653704a4f824c9674f5967cb (patch)
tree0850d50e5695694aa01ad16ec943818a530821f4
parent4f09f1cf2f9e43dc2b226d8f3b30a41f3f0e6d73 (diff)
downloadb4-46b9e092457c2921653704a4f824c9674f5967cb.tar.gz
Fix crasher when attempting a 3-way prep
Don't attempt a len() on an object that may be None. This happens when there are patches prepared with a tool like quilt that don't include indexes. Reported-by: Mark Brown <broonie@kernel.org> Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rw-r--r--b4/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/b4/__init__.py b/b4/__init__.py
index 15c5e7d..4959db0 100644
--- a/b4/__init__.py
+++ b/b4/__init__.py
@@ -696,7 +696,7 @@ class LoreSeries:
return None, None
logger.debug('Looking at %s', lmsg.full_subject)
lmsg.load_hashes()
- if not len(lmsg.blob_indexes):
+ if not lmsg.blob_indexes:
logger.critical('ERROR: some patches do not have indexes')
logger.critical(' unable to create a fake-am range')
return None, None