mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #12659 -- Return a more meaningful KeyError message when ContextList lookups fail. Thanks to rodriguealcazar for the suggestion.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12274 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -15,7 +15,7 @@ class ContextList(list):
|
||||
for subcontext in self:
|
||||
if key in subcontext:
|
||||
return subcontext[key]
|
||||
raise KeyError
|
||||
raise KeyError(key)
|
||||
else:
|
||||
return super(ContextList, self).__getitem__(key)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user