Skip to content

Commit

Permalink
Fixed #15628 -- Made the admin error email more useful when there isn…
Browse files Browse the repository at this point in the history
…'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
  • Loading branch information
freakboy3742 committed Mar 17, 2011
1 parent 354aa94 commit 7ab5ce6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion django/utils/log.py
Expand Up @@ -79,7 +79,11 @@ def emit(self, record):
)
request_repr = repr(request)
except:
subject = 'Error: Unknown URL'
subject = '%s: %s' % (
record.levelname,
record.msg
)

request = None
request_repr = "Request repr() unavailable"

Expand Down

0 comments on commit 7ab5ce6

Please sign in to comment.