link.py 文件源码

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

项目:solaris-ips 作者: oracle 项目源码 文件源码
def verify(self, img, **args):
                """Returns a tuple of lists of the form (errors, warnings,
                info).  The error list will be empty if the action has been
                correctly installed in the given image."""

                target = self.attrs["target"]
                path = self.get_installed_path(img.get_root())

                lstat, errors, warnings, info, abort = \
                    self.verify_fsobj_common(img, stat.S_IFLNK)

                if abort:
                        assert errors
                        return errors, warnings, info

                atarget = os.readlink(path)

                if target != atarget:
                        errors.append(_("Target: '{found}' should be "
                            "'{expected}'").format(found=atarget,
                            expected=target))
                return errors, warnings, info
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号