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"
评论列表
文章目录