mirror of
https://github.com/django/django.git
synced 2024-12-25 02:26:12 +00:00
Fixed #15628 -- Made the admin error email more useful when there isn't a request associated with the message. Thanks to hynek for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15869 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
354aa941b6
commit
7ab5ce6cf1
@ -79,7 +79,11 @@ class AdminEmailHandler(logging.Handler):
|
||||
)
|
||||
request_repr = repr(request)
|
||||
except:
|
||||
subject = 'Error: Unknown URL'
|
||||
subject = '%s: %s' % (
|
||||
record.levelname,
|
||||
record.msg
|
||||
)
|
||||
|
||||
request = None
|
||||
request_repr = "Request repr() unavailable"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user