[Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/TopicIndex - TopicIndex.py:1.9.4.1

Chris McDonough chrism@zope.com
Fri, 3 Jan 2003 01:34:06 -0500


Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/TopicIndex
In directory cvs.zope.org:/tmp/cvs-serv27194/PluginIndexes/TopicIndex

Modified Files:
      Tag: chrism-install-branch
	TopicIndex.py 
Log Message:
Merging chrism-install-branch with HEAD (hopefully for one of the last
times).



=== Zope/lib/python/Products/PluginIndexes/TopicIndex/TopicIndex.py 1.9 => 1.9.4.1 ===
--- Zope/lib/python/Products/PluginIndexes/TopicIndex/TopicIndex.py:1.9	Wed Aug 14 18:19:34 2002
+++ Zope/lib/python/Products/PluginIndexes/TopicIndex/TopicIndex.py	Fri Jan  3 01:33:04 2003
@@ -21,6 +21,7 @@
 from Acquisition import Implicit
 from BTrees.OOBTree import OOBTree
 from BTrees.IIBTree import IISet,intersection,union
+from zLOG import ERROR, LOG
 import FilteredSet
 
 _marker = []
@@ -75,8 +76,13 @@
         """ hook for (Z)Catalog """
 
         for fs in self.filteredSets.values():
-            fs.unindex_object(documentId)
 
+            try:
+                fs.unindex_object(documentId)
+            except KeyError:
+                LOG(self.__class__.__name__, ERROR,
+                    'Attempt to unindex document'
+                    ' with id %s failed' % documentId)
         return 1
 
 
@@ -88,7 +94,8 @@
         return n
 
 
-    numObjects = "does not apply"
+    def numObjects(self):
+        return "N/A"
 
 
     def keys(self):   pass