summaryrefslogtreecommitdiff
path: root/rdiff-backup/src/highlevel.py
diff options
context:
space:
mode:
Diffstat (limited to 'rdiff-backup/src/highlevel.py')
-rw-r--r--rdiff-backup/src/highlevel.py19
1 files changed, 8 insertions, 11 deletions
diff --git a/rdiff-backup/src/highlevel.py b/rdiff-backup/src/highlevel.py
index d3b6b74..36ac997 100644
--- a/rdiff-backup/src/highlevel.py
+++ b/rdiff-backup/src/highlevel.py
@@ -268,19 +268,16 @@ class HLDestinationStruct:
def check_skip_error(cls, thunk, dsrp):
"""Run thunk, catch certain errors skip files"""
try: return thunk()
- except (IOError, OSError, SkipFileException, DSRPPermError,
+ except (EnvironmentError, SkipFileException, DSRPPermError,
RPathException), exp:
Log.exception()
- if (not isinstance(exp, IOError) or
- (isinstance(exp, IOError) and
- (exp[0] in [2, # Means that a file is missing
- 5, # Reported by docv (see list)
- 13, # Permission denied IOError
- 20, # Means a directory changed to non-dir
- 26, # Requested by Campbell (see list) -
- # happens on some NT systems
- 36] # filename too long
- ))):
+ if (not isinstance(exc, EnvironmentError) or
+ (errno.errorcode[exp[0]] in
+ ['EPERM', 'ENOENT', 'EACCES', 'EBUSY', 'EEXIST',
+ 'ENOTDIR', 'ENAMETOOLONG', 'EINTR', 'ENOTEMPTY',
+ 'EIO', # reported by docv
+ 'ETXTBSY' # reported by Campbell on some NT system
+ ])):
Log("Skipping file because of error after %s" %
(dsrp and dsrp.index,), 2)
return None