74 |
def clear_rp(self, rp): |
def clear_rp(self, rp): |
75 |
"""Delete all the extended attributes in rpath""" |
"""Delete all the extended attributes in rpath""" |
76 |
for name in rp.conn.xattr.listxattr(rp.path): |
for name in rp.conn.xattr.listxattr(rp.path): |
77 |
rp.conn.xattr.removexattr(rp.path, name) |
try: |
78 |
|
rp.conn.xattr.removexattr(rp.path, name) |
79 |
|
except IOError, exc: |
80 |
|
# SELinux attributes cannot be removed, and we don't want |
81 |
|
# to bail out or be too noisy at low log levels. |
82 |
|
if exc[0] == errno.EACCES: |
83 |
|
log.Log("Warning: unable to remove xattr %s from %s" |
84 |
|
% (name, rp.path), 7) |
85 |
|
continue |
86 |
|
else: raise |
87 |
|
|
88 |
def write_to_rp(self, rp): |
def write_to_rp(self, rp): |
89 |
"""Write extended attributes to rpath rp""" |
"""Write extended attributes to rpath rp""" |