From: Ross Burton Date: Wed, 9 Dec 2015 11:49:46 +0000 (+0000) Subject: cooker: use in instead of count X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3369072efb653339da8dbd1ca864ff8e1ff899ca;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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 Signed-off-by: Richard Purdie --- diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py index edceca00ed1..8592d234a3f 100644 --- a/lib/bb/cooker.py +++ b/lib/bb/cooker.py @@ -1080,7 +1080,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