decrepit.py 文件源码

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

项目:rust-script-toolbox 作者: DanielKeep 项目源码 文件源码
def get_dispatch(distro, arg):
    """
    Dispatch to the appropriate scraping function for the given distro.
    """
    defin = DISTROS[distro]
    try:
        if isinstance(defin, type(lambda:None)):
            return defin(arg)
        elif isinstance(defin, type("")):
            return get_dispatch(defin, arg)
        else:
            return get_scrape(distro, defin, arg)
    except:
        ex_ty, ex_ob, ex_tb = sys.exc_info()
        trace('get_dispatch(%r, %r) failed:' % (distro, arg))
        if VERBOSE:
            import traceback
            traceback.print_tb(ex_tb)
        trace('  %s: %s' % (ex_ty.__name__, ex_ob))
        return parse_semver('0.0.0')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号