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

Shane Hathaway shane@cvs.zope.org
Wed, 31 Jul 2002 09:33:58 -0400


Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv11753

Modified Files:
      Tag: CMF-1_3-branch
	CatalogTool.py 
Log Message:
Same fix as applied to HEAD


=== CMF/CMFCore/CatalogTool.py 1.30.4.3 => 1.30.4.4 ===
 
     manage_catalogFind = DTMLFile( 'catalogFind', _dtmldir )
 
-    def catalog_object(self, object, uid, idxs=[]):
+    def catalog_object(self, object, uid, idxs=()):
         # Wraps the object with workflow and accessibility
         # information just before cataloging.
         wf = getattr(self, 'portal_workflow', None)
@@ -248,7 +248,7 @@
         self.uncatalog_object(url)
 
     security.declarePrivate('reindexObject')
-    def reindexObject(self, object, idxs=[]):
+    def reindexObject(self, object, idxs=()):
         '''Update catalog after object data has changed.
         The optional idxs argument is a list of specific indexes
         to update (all of them by default).
@@ -257,7 +257,7 @@
         ## Zope 2.3 ZCatalog is supposed to work better if
         ## you don't uncatalog_object() when reindexing.
         # self.uncatalog_object(url)
-        if idxs != []:
+        if idxs:
             # Filter out invalid indexes.
             valid_indexes = self._catalog.indexes.keys()
             idxs = [i for i in idxs if i in valid_indexes]