From: Armin Ronacher Date: Thu, 15 May 2008 13:00:45 +0000 (+0200) Subject: fixed error on static subscribe aliasing if the subscription argument was a variable X-Git-Tag: 2.0rc1~57 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=151418ddce1ed22ae864b94d7d04a82ebabd6741;p=jinja2.git fixed error on static subscribe aliasing if the subscription argument was a variable --HG-- branch : trunk --- diff --git a/jinja2/compiler.py b/jinja2/compiler.py index aaaad9d..7a2ea4c 100644 --- a/jinja2/compiler.py +++ b/jinja2/compiler.py @@ -270,10 +270,10 @@ class FrameIdentifierVisitor(NodeVisitor): self.generic_visit(node) if isinstance(node.arg, nodes.Const) and \ isinstance(node.arg.value, basestring) and \ - (isinstance(node.node, nodes.Name) and + ((isinstance(node.node, nodes.Name) and node.node.name not in (self.identifiers.declared_locally | self.identifiers.declared_parameter)) or \ - node.node in self.identifiers.static_subscribes: + node.node in self.identifiers.static_subscribes): if node in self.identifiers.static_subscribes: self.identifiers.static_subscribes[node] += 1 else: