Shortcut for the if inner visit for empty branches.
authorArmin Ronacher <armin.ronacher@active-4.com>
Sun, 25 Oct 2009 12:03:08 +0000 (13:03 +0100)
committerArmin Ronacher <armin.ronacher@active-4.com>
Sun, 25 Oct 2009 12:03:08 +0000 (13:03 +0100)
--HG--
branch : trunk

jinja2/compiler.py

index 2dd68cdda1e2d2f69f17c8f4d6ae3ed3b9573eae..a6f26a59219558333ef140a3b8f90c6d399474ac 100644 (file)
@@ -278,6 +278,8 @@ class FrameIdentifierVisitor(NodeVisitor):
                     real_identifiers.declared_parameter
 
         def inner_visit(nodes):
+            if not nodes:
+                return set()
             self.identifiers = real_identifiers.copy()
             for subnode in nodes:
                 self.visit(subnode)