diff options
| author | Luke Plant <L.Plant.98@cantab.net> | 2011-01-04 04:02:42 +0000 |
|---|---|---|
| committer | Luke Plant <L.Plant.98@cantab.net> | 2011-01-04 04:02:42 +0000 |
| commit | 6849c5f3d5ed14743fa8f45fb4b2bba027ec9a62 (patch) | |
| tree | b85bde226479b68bc175267e6dd9d68bf6372b1a | |
| parent | 0b0e9457b2fedea68b10f6ef019d1d1a67f4863c (diff) | |
[1.2.X] Fixed sending mail on 404s to fail silently.
A failure in the e-mail system should not turn a 404 into a 500.
Backport of [15145] from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@15146 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/middleware/common.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/django/middleware/common.py b/django/middleware/common.py index 0be89d4382..7c748c812a 100644 --- a/django/middleware/common.py +++ b/django/middleware/common.py @@ -94,7 +94,8 @@ class CommonMiddleware(object): ip = request.META.get('REMOTE_ADDR', '<none>') mail_managers("Broken %slink on %s" % ((is_internal and 'INTERNAL ' or ''), domain), "Referrer: %s\nRequested URL: %s\nUser agent: %s\nIP address: %s\n" \ - % (referer, request.get_full_path(), ua, ip)) + % (referer, request.get_full_path(), ua, ip), + fail_silently=True) return response # Use ETags, if requested. |
