bosh.py 文件源码

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

项目:tile-generator 作者: cf-platform-eng 项目源码 文件源码
def ensure_bosh():
    bosh_exec = spawn.find_executable('bosh')
    ## check the version
    ## bosh --version
    ## version 2.0.1-74fad57-2017-02-15T20:17:00Z
    ##
    ## Succeeded
    ## bosh --version
    ## BOSH 1.3262.26.0

    if not bosh_exec:
        print("'bosh' command should be on the path. See https://bosh.io for installation instructions")
        sys.exit(1)

    if bosh_exec:
        output = subprocess.check_output(["bosh", "--version"], stderr=subprocess.STDOUT, cwd=".")
        if not output.startswith("version 2."):
            print("You are running older bosh version. Please upgrade to 'bosh 2.0' command should be on the path. See https://bosh.io/docs/cli-v2.html for installation instructions")
            sys.exit(1)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号