[bitbake-devel] bitbake: fix contains_any()

Submitted by Valentin Popa on June 5, 2014, 1:18 p.m.

Details

Message ID 1401974327-6414-1-git-send-email-valentin.popa@intel.com
State New
Headers show

Commit Message

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 hide | download patch | download mbox

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