Mercurial > genshi > mirror
diff genshi/template/directives.py @ 604:416e46209da1 trunk
Fix bug that slipped into [717]: the code of a `py:with` directive was not being compiled with AST transformations applied.
author | cmlenz |
---|---|
date | Thu, 23 Aug 2007 12:22:57 +0000 |
parents | d7b957e92ea9 |
children | ec86c89da78d |
line wrap: on
line diff
--- a/genshi/template/directives.py +++ b/genshi/template/directives.py @@ -23,7 +23,8 @@ from genshi.path import Path from genshi.template.base import TemplateRuntimeError, TemplateSyntaxError, \ EXPR, _apply_directives -from genshi.template.eval import Expression, Suite, _parse +from genshi.template.eval import Expression, Suite, ExpressionASTTransformer, \ + _parse __all__ = ['AttrsDirective', 'ChooseDirective', 'ContentDirective', 'DefDirective', 'ForDirective', 'IfDirective', 'MatchDirective', @@ -697,7 +698,8 @@ Directive.__init__(self, None, template, namespaces, lineno, offset) try: self.suite = Suite(value, template.filepath, lineno, - lookup=template.lookup) + lookup=template.lookup, + xform=ExpressionASTTransformer) except SyntaxError, err: err.msg += ' in expression "%s" of "%s" directive' % (value, self.tagname)