Commit 7ab5ce6c authored by Russell Keith-Magee's avatar Russell Keith-Magee
Browse files

Fixed #15628 -- Made the admin error email more useful when there isn't a...

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
parent 354aa941
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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"