From 93d2df782dd7e9c50799b0ddb20a8d80defdff86 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 23 May 2010 22:35:53 +0200 Subject: [PATCH] Fix unbound local error masked by bare except. --HG-- branch : trunk --- jinja2/nodes.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jinja2/nodes.py b/jinja2/nodes.py index b6696c7..c8bb047 100644 --- a/jinja2/nodes.py +++ b/jinja2/nodes.py @@ -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() -- 2.26.2