Fix unbound local error masked by bare except.
authorGeorg Brandl <georg@python.org>
Sun, 23 May 2010 20:35:53 +0000 (22:35 +0200)
committerGeorg Brandl <georg@python.org>
Sun, 23 May 2010 20:35:53 +0000 (22:35 +0200)
--HG--
branch : trunk

jinja2/nodes.py

index b6696c7e6d16bb106e2ca8f4c8571644b777665b..c8bb0476a8666e33217e4fe018860d420b336597 100644 (file)
@@ -638,7 +638,8 @@ class Getattr(Expr):
             raise Impossible()
         try:
             eval_ctx = get_eval_context(self, eval_ctx)
-            return self.environment.getattr(self.node.as_const(eval_ctx), arg)
+            return self.environment.getattr(self.node.as_const(eval_ctx),
+                                            self.attr)
         except:
             raise Impossible()