Remove unused imports and rename too short variable names in soc.views.helper.decorators module.
authorPawel Solyga <Pawel.Solyga@gmail.com>
Wed, 04 Mar 2009 17:33:48 +0000
changeset 1632 73a9bc6a85d9
parent 1631 25ec972b5aa2
child 1633 6b65707f4248
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
--- 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)