forkerator.py 文件源码

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

项目:forkerator 作者: drewrothstein 项目源码 文件源码
def validate_platform(self):
        """Validates the platform and distribution to make sure it is supported.

        Raises:
            NotImplementedError: Unsupported System/OS.
        """
        system = platform.system()
        if system != 'Linux':
            self.log.error('Unsupported System/OS: {0}'.format(system))
            raise NotImplementedError

        self.dist = platform.dist()[0]
        if self.dist == 'Ubuntu':
            self.log.debug('Distribution: Ubuntu')
        elif self.dist == 'centos':
            self.log.debug('Distribution: centos')
        else:
            self.log.error('Unsupported Distribution: {0}'.format(self.dist))
            raise NotImplementedError
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号