Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Made ModPythonHandler.get_response() tolerant of repr(request) that h…

…as an exception

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 20820f2e85e6e4937e76f83c37b04e3eeda76308 1 parent 49fbe71
Adrian Holovaty adrianholovaty authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 django/core/handlers/
6 django/core/handlers/
@@ -235,7 +235,11 @@ def get_response(self, path, request):
return self.get_technical_error_response()
subject = 'Coding error (%s IP)' % (request.META['REMOTE_ADDR'] in INTERNAL_IPS and 'internal' or 'EXTERNAL')
- message = "%s\n\n%s" % (self._get_traceback(), request)
+ try:
+ request_repr = repr(request)
+ except:
+ request_repr = "Request repr() unavailable"
+ message = "%s\n\n%s" % (self._get_traceback(), request_repr)
mail_admins(subject, message, fail_silently=True)
return self.get_friendly_error_response(request, conf_module)
Please sign in to comment.
Something went wrong with that request. Please try again.