fixed error on static subscribe aliasing if the subscription argument was a variable
authorArmin Ronacher <armin.ronacher@active-4.com>
Thu, 15 May 2008 13:00:45 +0000 (15:00 +0200)
committerArmin Ronacher <armin.ronacher@active-4.com>
Thu, 15 May 2008 13:00:45 +0000 (15:00 +0200)
--HG--
branch : trunk

jinja2/compiler.py

index aaaad9daf8360f45174fd1757363ced6750d8f34..7a2ea4c7ea8a05b6ac163c66413770b9a06cc6d0 100644 (file)
@@ -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: