Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

…as an exception

git-svn-id: http://code.djangoproject.com/svn/django/trunk@232 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 20820f2e85e6e4937e76f83c37b04e3eeda76308 1 parent 49fbe71
Adrian Holovaty authored July 20, 2005

Showing 1 changed file with 5 additions and 1 deletion. Show diff stats Hide diff stats

  1. 6  django/core/handlers/modpython.py
6  django/core/handlers/modpython.py
@@ -235,7 +235,11 @@ def get_response(self, path, request):
235 235
                 return self.get_technical_error_response()
236 236
             else:
237 237
                 subject = 'Coding error (%s IP)' % (request.META['REMOTE_ADDR'] in INTERNAL_IPS and 'internal' or 'EXTERNAL')
238  
-                message = "%s\n\n%s" % (self._get_traceback(), request)
  238
+                try:
  239
+                    request_repr = repr(request)
  240
+                except:
  241
+                    request_repr = "Request repr() unavailable"
  242
+                message = "%s\n\n%s" % (self._get_traceback(), request_repr)
239 243
                 mail_admins(subject, message, fail_silently=True)
240 244
                 return self.get_friendly_error_response(request, conf_module)
241 245
 

0 notes on commit 20820f2

Please sign in to comment.
Something went wrong with that request. Please try again.