cyris.py 文件源码

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

项目:cyris 作者: crond-jaist 项目源码 文件源码
def check_prerequsites(self):

        # TODO: Check that OS is Ubuntu?!

        # Check for sudo permission
        command = "timeout --foreground 2 sudo id"
        return_value = os.system("{0} > /dev/null 2>&1".format(command))
        exit_status = os.WEXITSTATUS(return_value)
        if exit_status != 0:
            print "* ERROR: cyris: Passwordless sudo execution is not enabled."
            self.handle_error()
            quit(-1)

        # TODO: Check that SSH keys are defined?!

        # TODO: Check if Internet access is available?!

    #########################################################################
    # Given a file with full path, separate the file name and the absolute path
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号