summaryrefslogtreecommitdiffstats
path: root/bitbake
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-21 22:01:56 +0000
commitd47f4553893d0468827cc675a5b4334c9a0fdd29 (patch)
tree3039408a1eb2bcbc14eed987ad2a05cf26353110 /bitbake
parenta927a0d0b7f2da3d730317c1dab6fffc6df41760 (diff)
downloadpoky-d47f4553893d0468827cc675a5b4334c9a0fdd29.tar.gz
bitbake: 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. (Bitbake rev: 217c4b436b588a6a47aeaddf61531711ad3fca67) Signed-off-by: Charlie Davies <charles.davies@whitetree.xyz> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/providers.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/providers.py b/bitbake/lib/bb/providers.py
index 0c87dfd4bc..32b2261eb0 100644
--- a/bitbake/lib/bb/providers.py
+++ b/bitbake/lib/bb/providers.py
@@ -250,7 +250,7 @@ def _filterProviders(providers, item, cfgData, dataCache):
250 250
251 if len(eligible) == 0: 251 if len(eligible) == 0:
252 logger.error("no eligible providers for %s", item) 252 logger.error("no eligible providers for %s", item)
253 return 0 253 return eligible
254 254
255 # If pn == item, give it a slight default preference 255 # If pn == item, give it a slight default preference
256 # This means PREFERRED_PROVIDER_foobar defaults to foobar if available 256 # This means PREFERRED_PROVIDER_foobar defaults to foobar if available