curl.py 文件源码

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

项目:fapistrano 作者: liwushuo 项目源码 文件源码
def download_artifact(**kwargs):
    with cd(env.release_path), credential_output():
        cmd = 'curl --max-time 30 --retry 3 %(curl_url)s' % env
        if env.curl_user:
            cmd += ' --user %(curl_user)s' % env
        if env.curl_output:
            cmd += ' -o %(curl_output)s' % env
        if env.curl_options:
            cmd += ' %(curl_options)s' % env
        if env.curl_extract_tar:
            cmd += ' | tar -x'
        elif env.curl_extract_tgz:
            cmd += ' | tar -xz'
        run(cmd)
        if env.curl_postinstall_script:
            output = show if env.curl_postinstall_output else hide
            with output('output'):
                run(env.curl_postinstall_script)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号