fixed attribute lookup error with old style classes
authorChristopher Grebs <entequak@googlemail.com>
Thu, 10 Jul 2008 09:52:17 +0000 (11:52 +0200)
committerChristopher Grebs <entequak@googlemail.com>
Thu, 10 Jul 2008 09:52:17 +0000 (11:52 +0200)
--HG--
branch : trunk

jinja2/environment.py

index 689bc92f12ea506a374f71b02f7932fdb2a73973..cf95060da8c123e6ec9740d88308a50455bf94ab 100644 (file)
@@ -313,7 +313,7 @@ class Environment(object):
             pass
         try:
             return obj[attribute]
-        except (TypeError, LookupError):
+        except (TypeError, LookupError, AttributeError):
             return self.undefined(obj=obj, name=attribute)
 
     def parse(self, source, name=None, filename=None):