From 151418ddce1ed22ae864b94d7d04a82ebabd6741 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Thu, 15 May 2008 15:00:45 +0200 Subject: [PATCH] fixed error on static subscribe aliasing if the subscription argument was a variable --HG-- branch : trunk --- jinja2/compiler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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: -- 2.26.2