From 185235d2cc39d4a32978f76e7cd34b3302f961ae Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Fri, 19 Dec 2008 03:03:16 +0100 Subject: [PATCH] work around for earlier compile error --- Cython/Compiler/ParseTreeTransforms.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Cython/Compiler/ParseTreeTransforms.py b/Cython/Compiler/ParseTreeTransforms.py index 9e383806..2e7bb061 100644 --- a/Cython/Compiler/ParseTreeTransforms.py +++ b/Cython/Compiler/ParseTreeTransforms.py @@ -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 -- 2.26.2