Commit 1a8aa424 authored by owsla's avatar owsla

Whoops. There is no such thing as a 'ListError' in python -- was confused

by a traceback message.


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@893 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent 9b796f17
......@@ -57,7 +57,7 @@ class ExtendedAttributes:
def read_from_rp(self, rp):
"""Set the extended attributes from an rpath"""
try: attr_list = rp.conn.xattr.listxattr(rp.path)
except (IOError, ListError), exc:
except IOError, exc:
if exc[0] == errno.EOPNOTSUPP or exc[0] == errno.EPERM:
return # if not supported, consider empty
if exc[0] == errno.EACCES or exc[0] == errno.ENOENT:
......@@ -93,7 +93,7 @@ class ExtendedAttributes:
% (name, repr(rp.path)), 7)
continue
else: raise
except (IOError, ListError), exc:
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
......@@ -108,7 +108,7 @@ class ExtendedAttributes:
for (name, value) in self.attr_dict.iteritems():
try:
rp.conn.xattr.setxattr(rp.path, name, value)
except (IOError, ListError), exc:
except IOError, exc:
# Mac and Linux attributes have different namespaces, so
# fail gracefully if can't call setxattr
if exc[0] == errno.EOPNOTSUPP or exc[0] == errno.EACCES \
......@@ -381,7 +381,7 @@ def get_acl_lists_from_rp(rp):
"""Returns (acl_list, def_acl_list) from an rpath. Call locally"""
assert rp.conn is Globals.local_connection
try: acl = posix1e.ACL(file=rp.path)
except (IOError, ListError), exc:
except IOError, exc:
if exc[0] == errno.EOPNOTSUPP: acl = None
if exc[0] == errno.ENOENT:
log.Log("Warning: unable to read ACL from %s: %s"
......@@ -390,7 +390,7 @@ def get_acl_lists_from_rp(rp):
else: raise
if rp.isdir():
try: def_acl = posix1e.ACL(filedef=rp.path)
except (IOError, ListError), exc:
except IOError, exc:
if exc[0] == errno.EOPNOTSUPP: def_acl = None
if exc[0] == errno.ENOENT:
log.Log("Warning: unable to read default ACL from %s: %s"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment