From 1714e797966a893e50c87d1bab10e71c1501d473 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Wed, 4 Jan 2006 17:09:26 +0000 Subject: [PATCH] Changed repr for MultiValueDict git-svn-id: http://code.djangoproject.com/svn/django/trunk@1819 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/utils/datastructures.py | 2 +- tests/othertests/httpwrappers.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/django/utils/datastructures.py b/django/utils/datastructures.py index 2b98117fda..8716c9cc3f 100644 --- a/django/utils/datastructures.py +++ b/django/utils/datastructures.py @@ -74,7 +74,7 @@ class MultiValueDict(dict): try: list_ = dict.__getitem__(self, key) except KeyError: - raise MultiValueDictKeyError, "Key %r not found in MultiValueDict %r" % (key, self) + raise MultiValueDictKeyError, "Key %r not found in %r" % (key, self) try: return list_[-1] except IndexError: diff --git a/tests/othertests/httpwrappers.py b/tests/othertests/httpwrappers.py index da11779027..e3aa7c4e42 100644 --- a/tests/othertests/httpwrappers.py +++ b/tests/othertests/httpwrappers.py @@ -8,7 +8,7 @@ >>> q['foo'] Traceback (most recent call last): ... -MultiValueDictKeyError: "Key 'foo' not found in MultiValueDict " +MultiValueDictKeyError: "Key 'foo' not found in " >>> q['something'] = 'bar' Traceback (most recent call last): @@ -86,7 +86,7 @@ AttributeError: This QueryDict instance is immutable >>> q['foo'] Traceback (most recent call last): ... -MultiValueDictKeyError: "Key 'foo' not found in MultiValueDict " +MultiValueDictKeyError: "Key 'foo' not found in " >>> q['name'] = 'john' @@ -186,7 +186,7 @@ True >>> q['bar'] Traceback (most recent call last): ... -MultiValueDictKeyError: "Key 'bar' not found in MultiValueDict " +MultiValueDictKeyError: "Key 'bar' not found in " >>> q['something'] = 'bar' Traceback (most recent call last):