From 79c7535327f77743c7cda7eff3323fbdd2a6b165 Mon Sep 17 00:00:00 2001 From: Pawel Solyga Date: Wed, 4 Mar 2009 17:33:48 +0000 Subject: [PATCH] Remove unused imports and rename too short variable names in soc.views.helper.decorators module. Patch by: Pawel Solyga Reviewed by: to-be-reviewed --- app/soc/views/helper/decorators.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/app/soc/views/helper/decorators.py b/app/soc/views/helper/decorators.py index 43a0fc0d..413cd2e5 100644 --- a/app/soc/views/helper/decorators.py +++ b/app/soc/views/helper/decorators.py @@ -27,7 +27,6 @@ import logging from functools import wraps -from google.appengine.api import users from google.appengine.runtime import DeadlineExceededError from google.appengine.runtime.apiproxy_errors import CapabilityDisabledError @@ -61,18 +60,18 @@ def view(func): try: return func(request, *args, **kwds) - except DeadlineExceededError, e: - logging.exception(e) + except DeadlineExceededError, exception: + logging.exception(exception) return http.HttpResponseRedirect('/soc/content/deadline_exceeded.html') - except CapabilityDisabledError, e: - logging.exception(e) + except CapabilityDisabledError, exception: + logging.exception(exception) # assume the site is in maintenance if we get CDE return http.HttpResponseRedirect('/maintenance') - except MemoryError, e: - logging.exception(e) + except MemoryError, exception: + logging.exception(exception) return http.HttpResponseRedirect('/soc/content/memory_error.html') - except AssertionError, e: - logging.exception(e) + except AssertionError, exception: + logging.exception(exception) return http.HttpResponseRedirect('/soc/content/assertion_error.html') return view_wrapper @@ -101,7 +100,6 @@ def check_access(func): # Do not pollute helper.decorators with access specific imports from soc.views import out_of_band from soc.views import helper - from soc.views.helper import access from soc.views.helper import responses @wraps(func) -- 2.11.4.GIT