utils.py 文件源码

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

项目:skipper 作者: Stratoscale 项目源码 文件源码
def get_remote_image_info(image, registry):
    urllib3.disable_warnings()
    image_info = []
    url = IMAGE_TAGS_URL % dict(registry=registry, image=image)
    response = requests.get(url=url, verify=False)
    info = response.json()
    if response.ok:
        image_info += [[registry, image, tag] for tag in info['tags']]
    else:
        if info['errors'][0]['code'] == 'NAME_UNKNOWN':
            pass
        else:
            raise Exception(info)

    return image_info
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号