def validate_taxdump(value, method):
if (os.path.isfile("%s/%s" % (value, "names.dmp")) and
os.path.isfile("%s/%s" % (value, "nodes.dmp")) and
os.path.isfile("%s/%s" % (value, "merged.dmp")) and
os.path.isfile("%s/%s" % (value, "delnodes.dmp"))):
return value
else:
with click.Context(method) as ctx:
click.echo(ctx.get_help())
raise click.BadParameter("Could not find names.dmp in taxdump, specify a value or make sure the files are present")
评论列表
文章目录