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
--- 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()),