diff options
author | owsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2008-06-23 13:49:29 +0000 |
---|---|---|
committer | owsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2008-06-23 13:49:29 +0000 |
commit | c2f5082c27443e80e59e73cc3fae19e20cb0ab48 (patch) | |
tree | 57c4ab360f02c2261b2ff14a0cb010d8297d7b2a /rdiff-backup/rdiff_backup/eas_acls.py | |
parent | 16cb4fb3df42c47cbbf736555e3d3d46cc3c7e7e (diff) | |
download | rdiff-backup-c2f5082c27443e80e59e73cc3fae19e20cb0ab48.tar.gz |
Actually make rdiff-backup robust to failure to read an ACL because the
file cannot be found.
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@901 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/rdiff_backup/eas_acls.py')
-rw-r--r-- | rdiff-backup/rdiff_backup/eas_acls.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/rdiff-backup/rdiff_backup/eas_acls.py b/rdiff-backup/rdiff_backup/eas_acls.py index 513af14..a6fac3d 100644 --- a/rdiff-backup/rdiff_backup/eas_acls.py +++ b/rdiff-backup/rdiff_backup/eas_acls.py @@ -96,7 +96,7 @@ class ExtendedAttributes: except IOError, exc: if exc[0] == errno.EOPNOTSUPP or exc[0] == errno.EPERM: return # if not supported, consider empty - if exc[0] == errno.ENOENT: # path is bad + elif exc[0] == errno.ENOENT: # path is bad log.Log("Warning: unable to clear xattrs on %s: %s" % (repr(rp.path), exc), 3) return @@ -382,8 +382,9 @@ def get_acl_lists_from_rp(rp): assert rp.conn is Globals.local_connection try: acl = posix1e.ACL(file=rp.path) except IOError, exc: - if exc[0] == errno.EOPNOTSUPP: acl = None - if exc[0] == errno.ENOENT: + if exc[0] == errno.EOPNOTSUPP: + acl = None + elif exc[0] == errno.ENOENT: log.Log("Warning: unable to read ACL from %s: %s" % (repr(rp.path), exc), 3) acl = None @@ -391,8 +392,9 @@ def get_acl_lists_from_rp(rp): if rp.isdir(): try: def_acl = posix1e.ACL(filedef=rp.path) except IOError, exc: - if exc[0] == errno.EOPNOTSUPP: def_acl = None - if exc[0] == errno.ENOENT: + if exc[0] == errno.EOPNOTSUPP: + def_acl = None + elif exc[0] == errno.ENOENT: log.Log("Warning: unable to read default ACL from %s: %s" % (repr(rp.path), exc), 3) def_acl = None |