if xattr is not None:
def _copyxattr(src, dest, exclude=None):
- attrs = xattr.list(src)
+ try:
+ attrs = xattr.list(src)
+ raise_exception = False
+ except IOError as e:
+ raise_exception = True
+ if e.errno != OperationNotSupported.errno:
+ raise
+ if raise_exception:
+ raise OperationNotSupported(
+ _("Filesystem containing file '%s' "
+ "does not support listing of extended attributes") %
+ (_unicode_decode(src),))
+
if attrs:
if exclude is not None and isinstance(attrs[0], bytes):
exclude = exclude.encode(_encodings['fs'])