eas_acls.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:rdiff-backup 作者: sol1 项目源码 文件源码
def write_to_rp(self, rp):
        """Write extended attributes to rpath rp"""
        self.clear_rp(rp)
        for (name, value) in self.attr_dict.iteritems():
            try:
                rp.conn.xattr.setxattr(encode(rp.path), name,
                                        value, 0, rp.issym())
            except IOError, exc:
                # Mac and Linux attributes have different namespaces, so
                # fail gracefully if can't call setxattr
                if exc[0] in (errno.EOPNOTSUPP, errno.EPERM, errno.EACCES,
                        errno.ENOENT, errno.EINVAL):
                    log.Log("Warning: unable to write xattr %s to %s"
                            % (name, repr(rp.path)), 6)
                    continue
                else: raise
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号