Skip to content

Commit

Permalink
Use the Program node. Macro nodes do not have the necessary globa…
Browse files Browse the repository at this point in the history
…l environment.
  • Loading branch information
malthe committed Feb 28, 2011
1 parent 13360de commit 71e6e27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/z3c/pt/pagetemplate.py
Expand Up @@ -9,7 +9,7 @@
from chameleon.tales import StringExpr
from chameleon.tales import NotExpr
from chameleon.nodes import Assignment
from chameleon.nodes import Macro
from chameleon.nodes import Program
from chameleon.compiler import Compiler

from z3c.pt import expressions
Expand Down Expand Up @@ -131,7 +131,7 @@ def evaluate_expression(self, pragma, expr):
except KeyError:
expression = "%s:%s" % (pragma, expr)
assignment = Assignment(["_expr_result"], expression, True)
macro = Macro(None, [assignment])
macro = Program(None, [assignment])
compiler = Compiler(self.engine, macro)

d = {}
Expand Down

0 comments on commit 71e6e27

Please sign in to comment.