[CMF-checkins] CVS: Products/CMFCore - CatalogTool.py:1.42.2.5

Florent Guillaume fg at nuxeo.com
Thu Nov 18 10:56:03 EST 2004


Update of /cvs-repository/Products/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv23989

Modified Files:
      Tag: CMF-1_4-branch
	CatalogTool.py 
Log Message:
Better compatibility with existing range syntax implementation.


=== Products/CMFCore/CatalogTool.py 1.42.2.4 => 1.42.2.5 ===
--- Products/CMFCore/CatalogTool.py:1.42.2.4	Tue Nov 16 16:52:06 2004
+++ Products/CMFCore/CatalogTool.py	Thu Nov 18 10:55:32 2004
@@ -225,19 +225,19 @@
             # Intersect query restrictions with those implicit to the tool
             for k in 'effective', 'expires':
                 if kw.has_key(k):
-                    range = kw[k]['range'].split(':')
+                    range = kw[k]['range'] or ''
                     query = kw[k]['query']
                     if (not isinstance(query, TupleType) and
                         not isinstance(query, ListType)):
                         query = (query,)
                 else:
-                    range = []
+                    range = ''
                     query = None
-                if 'min' in range:
+                if range.find('min') > -1:
                     lo = min(query)
                 else:
                     lo = None
-                if 'max' in range:
+                if range.find('max') > -1:
                     hi = max(query)
                 else:
                     hi = None



More information about the CMF-checkins mailing list