diff options
author | Zac Medico <zmedico@gentoo.org> | 2013-09-03 13:03:17 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2013-09-03 13:03:17 -0700 |
commit | d6d555e0b43d0beee617952267406c305edecb05 (patch) | |
tree | c73f2aa9476047938f256a7a45c2da328baf9d91 /pym/portage/util/movefile.py | |
parent | install.py: show args if copy_xattrs fails (diff) | |
download | portage-d6d555e0b43d0beee617952267406c305edecb05.tar.gz portage-d6d555e0b43d0beee617952267406c305edecb05.tar.bz2 portage-d6d555e0b43d0beee617952267406c305edecb05.zip |
_copyxattr: handle EOPNOTSUPP from xattr.list()
Diffstat (limited to 'pym/portage/util/movefile.py')
-rw-r--r-- | pym/portage/util/movefile.py | 14 |
1 files changed, 13 insertions, 1 deletions
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']) |