From 3d4273716d6b6c2be2b2de774fd86dc6997eb95a Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Wed, 9 Dec 2015 11:49:46 +0000 Subject: bitbake: cooker: use in instead of count No point counting all instances when we just want to know if there's any or not. (Bitbake rev: 3369072efb653339da8dbd1ca864ff8e1ff899ca) Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- bitbake/lib/bb/cooker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bitbake/lib/bb/cooker.py') diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index edceca00ed..8592d234a3 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/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 -- cgit v1.2.3-54-g00ecf