From 69125ce90453f94c92432be1ab67768db514c82d Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Tue, 5 May 2015 10:58:27 +0200 Subject: [PATCH] Extended variable name in handlers/base.py Refs #24733. --- django/core/handlers/base.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/django/core/handlers/base.py b/django/core/handlers/base.py index e85f839710..a4edf876bf 100644 --- a/django/core/handlers/base.py +++ b/django/core/handlers/base.py @@ -162,14 +162,14 @@ class BaseHandler(object): % (middleware_method.__self__.__class__.__name__)) response = response.render() - except http.Http404 as e: + except http.Http404 as exc: logger.warning('Not Found: %s', request.path, extra={ 'status_code': 404, 'request': request }) if settings.DEBUG: - response = debug.technical_404_response(request, e) + response = debug.technical_404_response(request, exc) else: response = self.get_exception_response(request, resolver, 404) @@ -191,13 +191,13 @@ class BaseHandler(object): }) response = self.get_exception_response(request, resolver, 400) - except SuspiciousOperation as e: + except SuspiciousOperation as exc: # The request logger receives events for any problematic request # The security logger receives events for all SuspiciousOperations security_logger = logging.getLogger('django.security.%s' % - e.__class__.__name__) + exc.__class__.__name__) security_logger.error( - force_text(e), + force_text(exc), extra={ 'status_code': 400, 'request': request