Skip to content
Browse files

Fixed #4701 -- sys.exit() will no longer get swallowed by the http ha…

…ndler. Slightly backwards compatible, perhaps, but you really shouldn't be sys.exit()ing in view code anyway. Thanks, Bastian Kleineidam.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 9780247 commit 03ebd159a0471350e7d799e89740f2d7a2d419e8 @jacobian jacobian committed
Showing with 2 additions and 1 deletion.
  1. +2 −1 django/core/handlers/
3 django/core/handlers/
@@ -109,7 +109,8 @@ def get_response(self, request):
except exceptions.PermissionDenied:
return http.HttpResponseForbidden('<h1>Permission denied</h1>')
except SystemExit:
- pass # See
+ # 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()

0 comments on commit 03ebd15

Please sign in to comment.
Something went wrong with that request. Please try again.