Remove unused imports soc.cache.base module and rename key variable to filter_key in soc.views.sitemap modules (access to outer scope names).
authorPawel Solyga <Pawel.Solyga@gmail.com>
Fri, 03 Apr 2009 17:23:53 +0000
changeset 2070 9555be8634a3
parent 2069 08b13ca90666
child 2071 0aa24d8655ac
Remove unused imports soc.cache.base module and rename key variable to filter_key in soc.views.sitemap modules (access to outer scope names). Patch by: Pawel Solyga Reviewed by: to-be-reviewed
app/soc/cache/base.py
app/soc/cache/logic.py
--- a/app/soc/cache/base.py	Fri Apr 03 17:21:26 2009 +0000
+++ b/app/soc/cache/base.py	Fri Apr 03 17:23:53 2009 +0000
@@ -38,6 +38,8 @@
 
     @wraps(func)
     def wrapper(*args, **kwargs):
+      """Decorator wrapper method.
+      """
       result, key = get(*args, **kwargs)
       if result:
         return result
--- a/app/soc/cache/logic.py	Fri Apr 03 17:21:26 2009 +0000
+++ b/app/soc/cache/logic.py	Fri Apr 03 17:23:53 2009 +0000
@@ -34,9 +34,9 @@
 
   new_filter = {}
 
-  for key, value in filter.iteritems():
+  for filter_key, value in filter.iteritems():
     new_value = value.key().name() if isinstance(value, db.Model) else value
-    new_filter[key] = new_value
+    new_filter[filter_key] = new_value
 
   return 'query_for_%(kind)s_%(filter)s_%(order)s' % {
       'kind': repr(model.kind()),