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
评论列表
文章目录