task-base: change the 'set' logic to work a bit better
authorChris Larson <chris_larson@mentor.com>
Fri, 9 Apr 2010 00:24:49 +0000 (17:24 -0700)
committerChris Larson <chris_larson@mentor.com>
Fri, 9 Apr 2010 00:25:57 +0000 (17:25 -0700)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
recipes/tasks/task-base.bb

index 555a463..bc1324b 100644 (file)
@@ -137,9 +137,9 @@ python __anonymous () {
     import bb
 
     try:
-       set
-    except NameError:
-       from sets import Set as set
+        set = __builtins__["set"]
+    except KeyError:
+        from sets import Set as set
 
     distro_features = set(bb.data.getVar("DISTRO_FEATURES", d, 1).split())
     machine_features= set(bb.data.getVar("MACHINE_FEATURES", d, 1).split())