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

silently ingore uncataloging absent id

parent 529c6355
...@@ -369,9 +369,7 @@ class Catalog(Persistent, Acquisition.Implicit): ...@@ -369,9 +369,7 @@ 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():
...@@ -385,6 +383,9 @@ class Catalog(Persistent, Acquisition.Implicit): ...@@ -385,6 +383,9 @@ class Catalog(Persistent, Acquisition.Implicit):
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