work around for earlier compile error
authorStefan Behnel <scoder@users.berlios.de>
Fri, 19 Dec 2008 02:03:16 +0000 (03:03 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Fri, 19 Dec 2008 02:03:16 +0000 (03:03 +0100)
Cython/Compiler/ParseTreeTransforms.py

index 9e383806d9af07c31dc4eb117e5670c78d031e4a..2e7bb0613c3251a8ea5f57151e8d01e95bd23b3e 100644 (file)
@@ -634,9 +634,10 @@ class ComprehensionTransform(VisitorTransform):
         return node
 
     def visit_NameNode(self, node):
-        replacement = self.comprehension_targets.get(node.entry.cname)
-        if replacement is not None:
-            return replacement
+        if node.entry:
+            replacement = self.comprehension_targets.get(node.entry.cname)
+            if replacement is not None:
+                return replacement
         return node