From 9a82eb6ff109e95dbb6cf26ee3d2ce1c548714bb Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Tue, 1 Feb 2011 14:18:07 +0000 Subject: Fixed #14972 -- Ensure that the HTML email logger always produces useful output, regardless of whether it has been given an exception or a request. Thanks to jamstooks for the report, and bpeschier for the initial patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15383 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/utils/log.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'django/utils') diff --git a/django/utils/log.py b/django/utils/log.py index 1f6dc52849..784035b3cf 100644 --- a/django/utils/log.py +++ b/django/utils/log.py @@ -83,7 +83,7 @@ class AdminEmailHandler(logging.Handler): exc_info = record.exc_info stack_trace = '\n'.join(traceback.format_exception(*record.exc_info)) else: - exc_info = () + exc_info = (None, record.msg, None) stack_trace = 'No stack trace available' message = "%s\n\n%s" % (stack_trace, request_repr) -- cgit v1.3