[CMF-checkins] CVS: Products/CMFCore - ActionsTool.py:1.51.2.1
CatalogTool.py:1.55.2.6
Yvo Schubbe
y.2005- at wcm-solutions.de
Mon Apr 11 06:43:12 EDT 2005
Update of /cvs-repository/Products/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv9717/CMFCore
Modified Files:
Tag: CMF-1_5-branch
ActionsTool.py CatalogTool.py
Log Message:
simplified code a bit
=== Products/CMFCore/ActionsTool.py 1.51 => 1.51.2.1 ===
--- Products/CMFCore/ActionsTool.py:1.51 Thu Aug 12 11:07:39 2004
+++ Products/CMFCore/ActionsTool.py Mon Apr 11 06:43:11 2005
@@ -176,16 +176,11 @@
'global':[],
'workflow':[],
}
+
for action in actions:
- category = action['category']
- catlist = filtered_actions.get(category, None)
- if catlist is None:
- filtered_actions[category] = catlist = []
+ catlist = filtered_actions.setdefault(action['category'], [])
catlist.append(action)
- # ...should you need it, here's some code that filters
- # by equality (use instead of the line above)
- #if not action in catlist:
- # catlist.append(action)
+
return filtered_actions
# listFilteredActions() is an alias.
=== Products/CMFCore/CatalogTool.py 1.55.2.5 => 1.55.2.6 ===
--- Products/CMFCore/CatalogTool.py:1.55.2.5 Thu Apr 7 12:37:46 2005
+++ Products/CMFCore/CatalogTool.py Mon Apr 11 06:43:12 2005
@@ -247,8 +247,7 @@
if kw.has_key(k):
range = kw[k]['range'] or ''
query = kw[k]['query']
- if (not isinstance(query, tuple) and
- not isinstance(query, list)):
+ if not isinstance(query, (tuple, list)):
query = (query,)
else:
range = ''
More information about the CMF-checkins
mailing list