cooker: use in instead of count
PATCH 1/1 cooker: use in instead of count
No point counting all instances when we just want to know if there's any or not.
Signed-off-by Ross Burton <[email protected]>
--- bitbake/lib/bb/cooker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
bitbake/lib/bb/cooker.py +1 -1
@@ -1072,7 +1072,7 @@ class BBCooker: for pfn in self.recipecache.pkg_fn: inherits = self.recipecache.inherits.get(pfn, None) - if inherits and inherits.count(klass) > 0: + if inherits and klass in inherits: pkg_list.append(self.recipecache.pkg_fn[pfn]) return pkg_list
Signature · 1 line
2.1.4