Skip to content

Commit

Permalink
merged __len__ bugfix from branch.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcdonc committed Mar 23, 2001
1 parent 9221e3b commit 9e67404
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions Catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,20 +476,11 @@ def uncatalogObject(self, uid):
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 '
Expand Down

0 comments on commit 9e67404

Please sign in to comment.