Commit 815611e2 authored by Michel Pelletier's avatar Michel Pelletier

silently ingore uncataloging absent id

parent 529c6355
...@@ -369,21 +369,22 @@ class Catalog(Persistent, Acquisition.Implicit): ...@@ -369,21 +369,22 @@ class Catalog(Persistent, Acquisition.Implicit):
catalogued, otherwise it will not get removed from the catalog catalogued, otherwise it will not get removed from the catalog
""" """
if uid not in self.uids.keys(): try:
raise ValueError, "Uncatalog of absent id %s" % `uid` rid = self.uids[uid]
rid = self.uids[uid]
for x in self.indexes.values(): for x in self.indexes.values():
if hasattr(x, 'unindex_object'): if hasattr(x, 'unindex_object'):
try: try:
x.unindex_object(rid) x.unindex_object(rid)
except KeyError: except KeyError:
pass #fugedaboudit pass #fugedaboudit
del self.data[rid] del self.data[rid]
del self.uids[uid] del self.uids[uid]
del self.paths[rid] del self.paths[rid]
except:
pass
def clear(self): def clear(self):
""" clear catalog """ """ clear catalog """
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment