aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mako/codegen.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2007-05-02 17:29:55 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2007-05-02 17:29:55 +0000
commit7b56458ea13ba58148fbea7cf0cba0dc72332821 (patch)
tree5c92e53dd9e2cdc412d3e820a7242142c89356b7 /lib/mako/codegen.py
parent3dabe23c995fca20b5460a12ade3549f7f1810fe (diff)
downloadexternal_python_mako-7b56458ea13ba58148fbea7cf0cba0dc72332821.tar.gz
external_python_mako-7b56458ea13ba58148fbea7cf0cba0dc72332821.tar.bz2
external_python_mako-7b56458ea13ba58148fbea7cf0cba0dc72332821.zip
- fixed codegen bug when defining <%def> within <%call> within <%call>
Diffstat (limited to 'lib/mako/codegen.py')
-rw-r--r--lib/mako/codegen.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/mako/codegen.py b/lib/mako/codegen.py
index 379cb4c..71df6b8 100644
--- a/lib/mako/codegen.py
+++ b/lib/mako/codegen.py
@@ -525,7 +525,8 @@ class _GenerateRenderMethod(object):
export.append(node.name)
# remove defs that are within the <%call> from the "closuredefs" defined
# in the body, so they dont render twice
- del body_identifiers.closuredefs[node.name]
+ if node.name in body_identifiers.closuredefs:
+ del body_identifiers.closuredefs[node.name]
vis = DefVisitor()
for n in node.nodes: