From: Georg Brandl Date: Sun, 23 May 2010 20:35:53 +0000 (+0200) Subject: Fix unbound local error masked by bare except. X-Git-Tag: 2.5~19 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=93d2df782dd7e9c50799b0ddb20a8d80defdff86;p=jinja2.git Fix unbound local error masked by bare except. --HG-- branch : trunk --- 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()