From c2f5082c27443e80e59e73cc3fae19e20cb0ab48 Mon Sep 17 00:00:00 2001 From: owsla Date: Mon, 23 Jun 2008 13:49:29 +0000 Subject: 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 --- rdiff-backup/CHANGELOG | 3 +++ rdiff-backup/rdiff_backup/eas_acls.py | 12 +++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG index 1e1c1a4..847ed5b 100644 --- a/rdiff-backup/CHANGELOG +++ b/rdiff-backup/CHANGELOG @@ -1,6 +1,9 @@ New in v1.1.17 (????/??/??) --------------------------- +Actually make rdiff-backup robust to failure to read an ACL because the file +cannot be found. (Andrew Ferguson) + Get makedist working on Windows. (Patch from Josh Nisly) 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 -- cgit v1.2.1