Repository :
http://git.fedorahosted.org/cgit/
On branch : master
---------------------------------------------------------------
commit b5cef9807b7becaaca8158680b33481ffd7261c0
Author: Matt Domsch <matt(a)domsch.com>
Date: Wed Dec 18 15:33:41 2013 -0600
Directory.destroySelf(): handle HostCategoryDir deletion
The crawler may create or destroy these items independently,
and concurrent to umdl invoking Directory.destroySelf().
Don't fail to destroy these just because something else already did.
---------------------------------------------------------------
server/mirrormanager/model.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/server/mirrormanager/model.py b/server/mirrormanager/model.py
index 961cf10..075cc81 100644
--- a/server/mirrormanager/model.py
+++ b/server/mirrormanager/model.py
@@ -686,7 +686,10 @@ class Directory(SQLObject):
r.destroySelf()
# don't destroy a whole category if only deleting a directory
for hcd in self.host_category_dirs:
- hcd.destroySelf()
+ # try/except this because crawlers running in parallel may
+ # create or destroy these at will
+ try: hcd.destroySelf()
+ except: pass
for fd in self.fileDetails:
fd.destroySelf()
for eh in self.exclusive_hosts: