campies.py 文件源码

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

项目:campies 作者: fgimian 项目源码 文件源码
def get_catalog(catalog_url):
    """Obtaines the Apple software catalog as a dict"""
    try:
        catalog_request = urlopen(catalog_url)
    except (IOError, URLError, HTTPError):
        raise CampiesError(
            'Unable to download catalog URL {catalog_url}'.format(
                catalog_url=catalog_url
            )
        )

    catalog_xml = catalog_request.read()
    try:
        catalog = loads_plist(catalog_xml)
    except xml.parsers.expat.ExpatError:
        raise CampiesError(
            'Unable to parse catalog XML to obtain software details'
        )
    return catalog
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号