summaryrefslogtreecommitdiff
path: root/django/core/handlers/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/core/handlers/base.py')
-rw-r--r--django/core/handlers/base.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/django/core/handlers/base.py b/django/core/handlers/base.py
index ca163f7232..55aec8fc9b 100644
--- a/django/core/handlers/base.py
+++ b/django/core/handlers/base.py
@@ -97,7 +97,7 @@ class BaseHandler(object):
RemovedInDjango20Warning, stacklevel=2
)
response = callback(request, **param_dict)
- except:
+ except Exception:
signals.got_request_exception.send(sender=self.__class__, request=request)
response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
@@ -224,7 +224,7 @@ class BaseHandler(object):
# Allow sys.exit() to actually exit. See tickets #1023 and #4701
raise
- except: # Handle everything else.
+ except Exception: # Handle everything else.
# Get the exception info now, in case another exception is thrown later.
signals.got_request_exception.send(sender=self.__class__, request=request)
response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
@@ -240,7 +240,7 @@ class BaseHandler(object):
"HttpResponse object. It returned None instead."
% (middleware_method.__self__.__class__.__name__))
response = self.apply_response_fixes(request, response)
- except: # Any exception should be gathered and handled
+ except Exception: # Any exception should be gathered and handled
signals.got_request_exception.send(sender=self.__class__, request=request)
response = self.handle_uncaught_exception(request, resolver, sys.exc_info())