def __handle(args): """Custom handler for 'diff' so custom error messages can be printed without having to capture 'parser' in main.""" output_dir = ['-e', '--export-dir'] if args.output_format == 'html' and \ not any(util.arg_match(output_dir, sys.argv[1:])): parser.error("argument --output html: not allowed without " "argument --export-dir") cmd_line_client.handle_diff_results(args)
def arg_match(options): return util.arg_match(options, sys.argv[1:])