aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCharlie Davies <charles.davies@whitetree.xyz>2021-02-18 20:52:13 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-02-20 11:16:17 +0000
commit217c4b436b588a6a47aeaddf61531711ad3fca67 (patch)
tree4af698835a2c8d92d1890cecdf8d1f55e57fd29e
parentd9a0a88db5888039bfbb6ce5129b43350f79b1c1 (diff)
downloadbitbake-217c4b436b588a6a47aeaddf61531711ad3fca67.tar.gz
bitbake: providers: fix incorrect return type bug
If no eligible providers are found then an integer zero is returned. This causes the following error, in two possible places in taskdata.py, when the return value is used in a list comprehension: [snip] eligible = [p for p in eligible if not p in self.failed_fns] TypeError: 'int' object is not iterable [\snip] Fix by returning the variable eligible itself, of type list. Signed-off-by: Charlie Davies <charles.davies@whitetree.xyz> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/providers.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bb/providers.py b/lib/bb/providers.py
index 0c87dfd4b..32b2261eb 100644
--- a/lib/bb/providers.py
+++ b/lib/bb/providers.py
@@ -250,7 +250,7 @@ def _filterProviders(providers, item, cfgData, dataCache):
if len(eligible) == 0:
logger.error("no eligible providers for %s", item)
- return 0
+ return eligible
# If pn == item, give it a slight default preference
# This means PREFERRED_PROVIDER_foobar defaults to foobar if available