From 46b9e092457c2921653704a4f824c9674f5967cb Mon Sep 17 00:00:00 2001 From: Konstantin Ryabitsev Date: Tue, 17 Nov 2020 15:50:52 -0500 Subject: 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 Signed-off-by: Konstantin Ryabitsev --- b4/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3