Patchwork [bitbake-devel] bitbake: fix contains_any()

login
register
mail settings
Submitter Valentin Popa
Date June 5, 2014, 1:18 p.m.
Message ID <1401974327-6414-1-git-send-email-valentin.popa@intel.com>
Download mbox | patch
Permalink /patch/73307/
State New
Headers show

Comments

Valentin Popa - June 5, 2014, 1:18 p.m.
"in" doesn't work for this case where
checkvalues is a set.

Signed-off-by: Valentin Popa <valentin.popa@intel.com>
---
 bitbake/lib/bb/utils.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py
index 96d8218..1ff201f 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -851,7 +851,7 @@  def contains_any(variable, checkvalues, truevalue, falsevalue, d):
         checkvalues = set(checkvalues.split())
     else:
         checkvalues = set(checkvalues)
-    if checkvalues in val:
+    if checkvalues & val != set([]):
         return truevalue
     return falsevalue