summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Kaplan-Moss <jacob@jacobian.org>2008-02-28 01:52:59 +0000
committerJacob Kaplan-Moss <jacob@jacobian.org>2008-02-28 01:52:59 +0000
commit03ebd159a0471350e7d799e89740f2d7a2d419e8 (patch)
tree2d8afb0585579d257f2b8597c1698d0ede0ac1cc
parent9780247a4c21f36f67ee636482399e306154f0bc (diff)
Fixed #4701 -- sys.exit() will no longer get swallowed by the http handler. Slightly backwards compatible, perhaps, but you really shouldn't be sys.exit()ing in view code anyway. Thanks, Bastian Kleineidam.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7168 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/core/handlers/base.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/django/core/handlers/base.py b/django/core/handlers/base.py
index 7f68946f3d..a81bec322f 100644
--- a/django/core/handlers/base.py
+++ b/django/core/handlers/base.py
@@ -109,7 +109,8 @@ class BaseHandler(object):
except exceptions.PermissionDenied:
return http.HttpResponseForbidden('<h1>Permission denied</h1>')
except SystemExit:
- pass # See http://code.djangoproject.com/ticket/1023
+ # Allow sys.exit() to actually exit. See tickets #1023 and #4701
+ raise
except: # Handle everything else, including SuspiciousOperation, etc.
# Get the exception info now, in case another exception is thrown later.
exc_info = sys.exc_info()