Scripting.py 文件源码

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

项目:SoCFoundationFlow 作者: mattaw 项目源码 文件源码
def update(ctx):
    lst = Options.options.files
    if lst:
        lst = lst.split(',')
    else:
        path = os.path.join(Context.waf_dir, 'waflib', 'extras')
        lst = [x for x in Utils.listdir(path) if x.endswith('.py')]
    for x in lst:
        tool = x.replace('.py', '')
        if not tool:
            continue
        try:
            dl = Configure.download_tool
        except AttributeError:
            ctx.fatal('The command "update" is dangerous; include the tool "use_config" in your project!')
        try:
            dl(tool, force=True, ctx=ctx)
        except Errors.WafError:
            Logs.error('Could not find the tool %r in the remote repository' % x)
        else:
            Logs.warn('Updated %r' % tool)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号