diff options
| author | Attila Tovt <uran198@gmail.com> | 2015-11-15 20:52:47 +0200 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-11-17 14:39:15 -0500 |
| commit | 0a2d3b7387b815b4e5d5f3c026f8409fd2a7ff70 (patch) | |
| tree | a55e3b469dd4e2e40b84b0517800f2c08ce9af06 /django/core/handlers/base.py | |
| parent | 16945f0e9c57aeabadb6f2e2f150a2687455be40 (diff) | |
Fixed #25682 -- Removed bare except clauses.
Diffstat (limited to 'django/core/handlers/base.py')
| -rw-r--r-- | django/core/handlers/base.py | 6 |
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()) |
