summaryrefslogtreecommitdiffstats
path: root/geo-replication
diff options
context:
space:
mode:
Diffstat (limited to 'geo-replication')
-rw-r--r--geo-replication/syncdaemon/resource.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/geo-replication/syncdaemon/resource.py b/geo-replication/syncdaemon/resource.py
index 0b756b750e7..8c490591849 100644
--- a/geo-replication/syncdaemon/resource.py
+++ b/geo-replication/syncdaemon/resource.py
@@ -818,11 +818,13 @@ class Server(object):
if st.st_ino == st1.st_ino:
# we have a hard link, we can now unlink source
try:
- os.unlink(entry)
+ errno_wrap(os.unlink, [entry],
+ [ENOENT, ESTALE])
except OSError as e:
if e.errno == EISDIR:
try:
- os.rmdir(entry)
+ errno_wrap(os.rmdir, [entry],
+ [ENOENT, ESTALE])
except OSError as e:
if e.errno == ENOTEMPTY:
logging.error(