You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and there is no match for my_attrname. The expected behavior would be for None to be returned but instead RuntimeException does not get caught by getattr.
Index: lib/mako/runtime.py
===================================================================
--- lib/mako/runtime.py (revision 441)
+++ lib/mako/runtime.py (working copy)
@@ -260,7 +260,7 @@
if self.inherits is not None:
return getattr(self.inherits, key)
- raise exceptions.RuntimeException("Namespace '%s' has no member '%s'" % (self.name, key))
+ raise AttributeError("Namespace '%s' has no member '%s'" % (self.name, key))
def supports_caller(func):
"""apply a caller_stack compatibility decorator to a plain Python function."""
The text was updated successfully, but these errors were encountered:
Migrated issue, originally created by Anonymous
The method
runtime.py:Namespace:__getattr__
raisesRuntimeException
when I think it should raiseAttributeError
.This comes up when you try to do this in your template:
and there is no match for my_attrname. The expected behavior would be for None to be returned but instead
RuntimeException
does not get caught by getattr.The use of
AttributeError
is mentioned here:http://docs.python.org/reference/datamodel.html#object.__getattr__
The text was updated successfully, but these errors were encountered: