summaryrefslogtreecommitdiff
path: root/Cython/Compiler/ParseTreeTransforms.py
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2016-08-31 09:43:57 +0200
committerStefan Behnel <stefan_ml@behnel.de>2016-08-31 09:43:57 +0200
commitd672f6f0abb6e5cc06079d9eb9147463accb9ef4 (patch)
tree9825f20d25f8f4cf62fac31bd24c40a91975b3d4 /Cython/Compiler/ParseTreeTransforms.py
parent957f6b4420c70a68b36dccad6de3e590484d98c7 (diff)
downloadcython-d672f6f0abb6e5cc06079d9eb9147463accb9ef4.tar.gz
repair compiler crash due to attribute error
Diffstat (limited to 'Cython/Compiler/ParseTreeTransforms.py')
-rw-r--r--Cython/Compiler/ParseTreeTransforms.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Cython/Compiler/ParseTreeTransforms.py b/Cython/Compiler/ParseTreeTransforms.py
index c293e9aa8..474d200fd 100644
--- a/Cython/Compiler/ParseTreeTransforms.py
+++ b/Cython/Compiler/ParseTreeTransforms.py
@@ -1697,7 +1697,7 @@ if VALUE is not None:
def visit_DefNode(self, node):
node = self.visit_FuncDefNode(node)
env = self.current_env()
- if node.is_wrapper:
+ if isinstance(node, Nodes.DefNode) and node.is_wrapper:
env = env.parent_scope
if (not isinstance(node, Nodes.DefNode) or
node.fused_py_func or node.is_generator_body or