From: Zac Medico Date: Tue, 3 Sep 2013 20:03:17 +0000 (-0700) Subject: _copyxattr: handle EOPNOTSUPP from xattr.list() X-Git-Tag: v2.2.2~7 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d6d555e0b43d0beee617952267406c305edecb05;p=portage.git _copyxattr: handle EOPNOTSUPP from xattr.list() --- diff --git a/pym/portage/util/movefile.py b/pym/portage/util/movefile.py index 4ac453513..1f92b59b7 100644 --- a/pym/portage/util/movefile.py +++ b/pym/portage/util/movefile.py @@ -98,7 +98,19 @@ else: 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'])