travis_pypi_setup.py 文件源码

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

项目:rust_pypi_example 作者: mckaymatt 项目源码 文件源码
def fetch_public_key(repo):
    """Download RSA public key Travis will use for this repo.

    Travis API docs: http://docs.travis-ci.com/api/#repository-keys
    """
    keyurl = 'https://api.travis-ci.org/repos/{0}/key'.format(repo)
    data = json.loads(urlopen(keyurl).read().decode())
    if 'key' not in data:
        errmsg = "Could not find public key for repo: {}.\n".format(repo)
        errmsg += "Have you already added your GitHub repo to Travis?"
        raise ValueError(errmsg)
    return data['key']
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号