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:50:52 -0500
commit6f77f63b58d6bd9d07c3c0ec124145f85a0823e8 (patch)
treebafe28685db5a231ee0960facbb7a2c15bf5e4d2
parentf33033c03cf96ed769289ebf6d3c26b0cf540683 (diff)
downloadb4-6f77f63b58d6bd9d07c3c0ec124145f85a0823e8.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 988df71..a0fa086 100644
--- a/b4/__init__.py
+++ b/b4/__init__.py
@@ -678,7 +678,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