1
0
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:
Russell Keith-Magee
2010-01-22 15:31:14 +00:00
parent 7ca9d9306c
commit f114fbecc2
2 changed files with 14 additions and 1 deletions

View File

@@ -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)