stringparser.py 文件源码

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

项目:bob 作者: BobBuildTool 项目源码 文件源码
def funMatchScm(args, **options):
    if len(args) != 2: raise ParseError("matchScm expects two arguments")
    name = args[0]
    val = args[1]
    try:
        pkg = options['package']
    except KeyError:
        raise ParseError('matchScm can only be used for queries')

    for scm in pkg.getCheckoutStep().getScmList():
        for props in scm.getProperties():
            if fnmatch.fnmatchcase(props.get(name), val): return "true"

    return "false"
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号