_copyxattr: report attribute name in error
authorZac Medico <zmedico@gentoo.org>
Tue, 2 Jul 2013 17:15:18 +0000 (10:15 -0700)
committerZac Medico <zmedico@gentoo.org>
Tue, 2 Jul 2013 17:15:18 +0000 (10:15 -0700)
The specific attribute name is often relevant. For example, an issue
with system.nfs4_acl was reported in bug #475496.

pym/portage/util/movefile.py

index f33e67c6288327990629036a313798053f9d3f76..c9159970d8522a6a01db8cf33f6a0d8b1a769147 100644 (file)
@@ -87,7 +87,9 @@ if hasattr(_os, "getxattr"):
                        except OSError:
                                raise_exception = True
                        if raise_exception:
-                               raise OperationNotSupported("Filesystem containing file '%s' does not support extended attributes" % dest)
+                               raise OperationNotSupported(_("Filesystem containing file '%s' "
+                                       "does not support extended attribute '%s'") %
+                                       (_unicode_decode(dest), _unicode_decode(attr)))
 else:
        try:
                import xattr
@@ -111,7 +113,9 @@ else:
                                except IOError:
                                        raise_exception = True
                                if raise_exception:
-                                       raise OperationNotSupported("Filesystem containing file '%s' does not support extended attributes" % dest)
+                                       raise OperationNotSupported(_("Filesystem containing file '%s' "
+                                               "does not support extended attribute '%s'") %
+                                               (_unicode_decode(dest), _unicode_decode(attr)))
        else:
                _devnull = open("/dev/null", "wb")
                try: