Skip to contentSkip to conversation

cooker: use in instead of count

PATCH In review Ross Burton 1 participant 2 messages Dec 10, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cooker: use in instead of count

---
 bitbake/lib/bb/cooker.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
bitbake/lib/bb/cooker.py +1 -1
index 4df8881..d39c64b 100644
@@ -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
#1 lore raw

Whoops, wrong list, and lame commit message.

Ross

Quoted 22 lines · Ross Burton
---
 bitbake/lib/bb/cooker.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
bitbake/lib/bb/cooker.py +1 -2
index 4df8881..d39c64b 100644
@@ -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
--

2.1.4