Code

Ticket #3235: __init__.py.diff

File __init__.py.diff, 795 bytes (added by Karen Tracey <kmtracey@…>, 7 years ago)
Line 
1Index: __init__.py
2===================================================================
3--- __init__.py (revision 4290)
4+++ __init__.py (working copy)
5@@ -660,7 +660,7 @@
6                     try: # list-index lookup
7                         current = current[int(bits[0])]
8                     except (IndexError, ValueError, KeyError):
9-                        raise VariableDoesNotExist, "Failed lookup for key [%s] in %r" % (bits[0], current) # missing attribute
10+                        raise VariableDoesNotExist, "Failed lookup for key [%s] in object of type %s" % (bits[0], type(current)) # missing attribute
11                 except Exception, e:
12                     if getattr(e, 'silent_variable_failure', False):
13                         current = settings.TEMPLATE_STRING_IF_INVALID