mirror of https://github.com/django/django.git
Made ModPythonHandler.get_response() tolerant of repr(request) that has an exception
git-svn-id: http://code.djangoproject.com/svn/django/trunk@232 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
49fbe711cc
commit
20820f2e85
|
@ -235,7 +235,11 @@ class ModPythonHandler:
|
||||||
return self.get_technical_error_response()
|
return self.get_technical_error_response()
|
||||||
else:
|
else:
|
||||||
subject = 'Coding error (%s IP)' % (request.META['REMOTE_ADDR'] in INTERNAL_IPS and 'internal' or 'EXTERNAL')
|
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)
|
mail_admins(subject, message, fail_silently=True)
|
||||||
return self.get_friendly_error_response(request, conf_module)
|
return self.get_friendly_error_response(request, conf_module)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue