formation.py 文件源码

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

项目:bay 作者: eventbrite 项目源码 文件源码
def validate(self):
        """
        Cross-checks the settings we have against the options the Container has
        """
        # Verify all link targets are possible
        for alias, target in list(self.links.items()):
            if isinstance(target, str):
                raise ValueError("Link target {} is still a string!".format(target))
            if target.container not in self.container.graph.dependencies(self.container):
                warnings.warn("It is not possible to link %s to %s as %s" % (target, self.container, alias))
                del self.links[alias]
        # Verify devmodes exist
        for devmode in list(self.devmodes):
            if devmode not in self.container.devmodes:
                warnings.warn("Invalid devmode %s on container %s" % (devmode, self.container.name))
                self.devmodes.remove(devmode)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号