# HG changeset patch # User Pawel Solyga # Date 1236188028 0 # Node ID 73a9bc6a85d99e1f77a9acfcacd5354dd980241f # Parent 25ec972b5aa2f7bc8df8bbcf8b47fa358217f98f Remove unused imports and rename too short variable names in soc.views.helper.decorators module. Patch by: Pawel Solyga Reviewed by: to-be-reviewed diff -r 25ec972b5aa2 -r 73a9bc6a85d9 app/soc/views/helper/decorators.py --- a/app/soc/views/helper/decorators.py Wed Mar 04 17:32:55 2009 +0000 +++ b/app/soc/views/helper/decorators.py Wed Mar 04 17:33:48 2009 +0000 @@ -27,7 +27,6 @@ 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 @@ 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 @@ # 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)