task-base.bb: use uniform test for set
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Mon, 8 Feb 2010 11:14:33 +0000 (11:14 +0000)
committerKhem Raj <raj.khem@gmail.com>
Wed, 10 Feb 2010 20:52:38 +0000 (12:52 -0800)
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
recipes/tasks/task-base.bb

index d59acba..fc04b46 100644 (file)
@@ -136,7 +136,9 @@ python __anonymous () {
 
     import bb
 
-    if not hasattr(__builtins__, 'set'):
+    try:
+       set
+    except NameError:
        from sets import Set as set
 
     distro_features = set(bb.data.getVar("DISTRO_FEATURES", d, 1).split())