]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
cooker: use in instead of count
authorRoss Burton <ross.burton@intel.com>
Wed, 9 Dec 2015 11:49:46 +0000 (11:49 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 7 Jan 2016 13:50:29 +0000 (13:50 +0000)
No point counting all instances when we just want to know if there's any or not.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/cooker.py

index edceca00ed1aa00b585aad5f39257ee299c1a4fe..8592d234a3f0d006688a4309f3848180f48142b2 100644 (file)
@@ -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