summaryrefslogtreecommitdiff
path: root/rdiff-backup/src/robust.py
diff options
context:
space:
mode:
authorben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2002-05-20 18:43:15 +0000
committerben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2002-05-20 18:43:15 +0000
commit1f4e957cd505f5cd3bcb6902e266b5bad6b17209 (patch)
tree60ed0b9da43cb0c4b386b3ec091ba20c87eaabf0 /rdiff-backup/src/robust.py
parente90980098d2ae3458a56b19d12805f62def8f8d6 (diff)
downloadrdiff-backup-1f4e957cd505f5cd3bcb6902e266b5bad6b17209.tar.gz
Added errno stuff instead of raw numbers, and now behavior of
destructive_stepping.init_dir depends on change_mirror_perms, which depends on whether you are running as root or not. git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@92 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/src/robust.py')
-rw-r--r--rdiff-backup/src/robust.py19
1 files changed, 8 insertions, 11 deletions
diff --git a/rdiff-backup/src/robust.py b/rdiff-backup/src/robust.py
index a0f6691..a5b1056 100644
--- a/rdiff-backup/src/robust.py
+++ b/rdiff-backup/src/robust.py
@@ -199,19 +199,16 @@ class Robust:
"""
try: return init_thunk()
- except (IOError, OSError, SkipFileException, DSRPPermError,
+ except (EnvironmentError, SkipFileException, DSRPPermError,
RPathException), exc:
Log.exception()
- if (not isinstance(exc, IOError) or
- (isinstance(exc, 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
+ ])):
return error_thunk(exc)
else: raise