From 217c4b436b588a6a47aeaddf61531711ad3fca67 Mon Sep 17 00:00:00 2001 From: Charlie Davies Date: Thu, 18 Feb 2021 20:52:13 +0000 Subject: 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 Signed-off-by: Richard Purdie --- lib/bb/providers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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 -- cgit 1.2.3-korg