[Zope-Checkins] CVS: Zope2 - Catalog.py:1.60.2.9
chrism@serenade.digicool.com
chrism@serenade.digicool.com
Fri, 23 Mar 2001 15:50:04 -0500
Update of /cvs-repository/Zope2/lib/python/Products/ZCatalog
In directory serenade.digicool.com:/home/chrism/sandboxes/2_3Branch/lib/python/Products/ZCatalog
Modified Files:
Tag: zope-2_3-branch
Catalog.py
Log Message:
Removed double call to __len__.change(-1) during uncatalogObject. Also removed some debugging code that was put in when uncatalogObject was having problems with KeyErrors (hopefully this won't happen now!)
--- Updated File Catalog.py in package Zope2 --
--- Catalog.py 2001/03/19 19:13:44 1.60.2.8
+++ Catalog.py 2001/03/23 20:50:03 1.60.2.9
@@ -476,20 +476,11 @@
x = x.__of__(self)
if hasattr(x, 'unindex_object'):
x.unindex_object(rid)
- # this should never raise an exception
- for btree in (data, paths):
- try:
- del btree[rid]
- except KeyError:
- LOG('Catalog', ERROR, ('uncatalogObject unsuccessfully '
- 'attempted to delete rid %s '
- 'from paths or data btree.' % rid))
- else:
- try: self.__len__.change(-1)
- except AttributeError: pass # No managed length
-
+ del data[rid]
+ del paths[rid]
del uids[uid]
- self.data = data
+ try: self.__len__.change(-1)
+ except AttributeError: pass # No managed length
else:
LOG('Catalog', ERROR, ('uncatalogObject unsuccessfully '
'attempted to uncatalog an object '