]> arthur.barton.de Git - bup.git/commitdiff
metadata.py: xattr exception strings don't have path information; add it.
authorRob Browning <rlb@defaultvalue.org>
Sun, 23 Mar 2014 16:19:31 +0000 (11:19 -0500)
committerRob Browning <rlb@defaultvalue.org>
Sun, 23 Mar 2014 16:19:40 +0000 (11:19 -0500)
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/metadata.py

index 831d5737102ca995fd298bf58774348b43e40260..b4cedf32005cd9960d7110a7537692a9c2980e68 100644 (file)
@@ -645,7 +645,7 @@ class Metadata:
             existing_xattrs = set(xattr.list(path, nofollow=True))
         except IOError, e:
             if e.errno == errno.EACCES:
-                raise ApplyError('xattr.set: %s' % e)
+                raise ApplyError('xattr.set %r: %s' % (path, e))
             else:
                 raise
         for k, v in self.linux_xattr:
@@ -656,7 +656,7 @@ class Metadata:
                 except IOError, e:
                     if e.errno == errno.EPERM \
                             or e.errno == errno.EOPNOTSUPP:
-                        raise ApplyError('xattr.set: %s' % e)
+                        raise ApplyError('xattr.set %r: %s' % (path, e))
                     else:
                         raise
             existing_xattrs -= frozenset([k])
@@ -665,7 +665,7 @@ class Metadata:
                 xattr.remove(path, k, nofollow=True)
             except IOError, e:
                 if e.errno == errno.EPERM:
-                    raise ApplyError('xattr.remove: %s' % e)
+                    raise ApplyError('xattr.remove %r: %s' % (path, e))
                 else:
                     raise