Ignore ENOENT and ENOTEMPTY errors in delete_partition
This is comparable to the error handling we have in delete_handoff_objs. Change-Id: I08bda9bcfeb60b3c5654322a9e6139a8ac5b3391
This commit is contained in:
parent
07e25b8698
commit
93fb77e8af
@ -576,7 +576,12 @@ class ObjectReplicator(Daemon):
|
||||
|
||||
def delete_partition(self, path):
|
||||
self.logger.info(_("Removing partition: %s"), path)
|
||||
tpool.execute(shutil.rmtree, path)
|
||||
try:
|
||||
tpool.execute(shutil.rmtree, path)
|
||||
except OSError as e:
|
||||
if e.errno not in (errno.ENOENT, errno.ENOTEMPTY):
|
||||
# If there was a race to create or delete, don't worry
|
||||
raise
|
||||
|
||||
def delete_handoff_objs(self, job, delete_objs):
|
||||
success_paths = []
|
||||
|
Loading…
x
Reference in New Issue
Block a user