From db2f9bfae173b565215a9f7320d7a45d0532f2fe Mon Sep 17 00:00:00 2001 From: Luke Plant Date: Thu, 9 Jun 2011 23:15:42 +0000 Subject: Fixed #16178 - Cleanup request classes' `__repr__()` Thanks to julien for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16350 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/core/handlers/modpython.py | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'django/core/handlers/modpython.py') diff --git a/django/core/handlers/modpython.py b/django/core/handlers/modpython.py index f0c77015b4..5affea45c5 100644 --- a/django/core/handlers/modpython.py +++ b/django/core/handlers/modpython.py @@ -45,32 +45,6 @@ class ModPythonRequest(http.HttpRequest): self._stream = self._req self._read_started = False - def __repr__(self): - # Since this is called as part of error handling, we need to be very - # robust against potentially malformed input. - try: - get = pformat(self.GET) - except: - get = '' - if self._post_parse_error: - post = '' - else: - try: - post = pformat(self.POST) - except: - post = '' - try: - cookies = pformat(self.COOKIES) - except: - cookies = '' - try: - meta = pformat(self.META) - except: - meta = '' - return smart_str(u'' % - (self.path, unicode(get), unicode(post), - unicode(cookies), unicode(meta))) - def get_full_path(self): # RFC 3986 requires self._req.args to be in the ASCII range, but this # doesn't always happen, so rather than crash, we defensively encode it. -- cgit v1.3