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

Andreas Jung andreas@andreas-jung.com
Thu, 28 Nov 2002 11:37:05 -0500


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

Modified Files:
      Tag: Zope-2_6-branch
	TopicIndex.py 
Log Message:
backport from trunk


=== Zope/lib/python/Products/PluginIndexes/TopicIndex/TopicIndex.py 1.9 => 1.9.6.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	Thu Nov 28 11:37:04 2002
@@ -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