Changeset 4461
- Timestamp:
- 02/06/07 07:59:24 (2 years ago)
- Files:
-
- django/trunk/django/template/__init__.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/template/__init__.py
r4161 r4461 118 118 119 119 class VariableDoesNotExist(Exception): 120 pass 121 120 121 def __init__(self, msg, params=()): 122 self.msg = msg 123 self.params = params 124 125 def __str__(self): 126 return self.mgs % self.params 127 122 128 class InvalidTemplateLibrary(Exception): 123 129 pass … … 661 667 current = current[int(bits[0])] 662 668 except (IndexError, ValueError, KeyError): 663 raise VariableDoesNotExist , "Failed lookup for key [%s] in %r" % (bits[0], current) # missing attribute669 raise VariableDoesNotExist("Failed lookup for key [%s] in %r", (bits[0], current)) # missing attribute 664 670 except Exception, e: 665 671 if getattr(e, 'silent_variable_failure', False):
