From 72ba40a0f4174232937af111a11e7b91d9edc707 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Tue, 24 Jan 2023 12:08:07 +0300 Subject: scripts: Provide help info for script. --- wqflask/scripts/parse_corr_html_results_to_csv.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'wqflask') diff --git a/wqflask/scripts/parse_corr_html_results_to_csv.py b/wqflask/scripts/parse_corr_html_results_to_csv.py index c54d99ca..464eb2ca 100644 --- a/wqflask/scripts/parse_corr_html_results_to_csv.py +++ b/wqflask/scripts/parse_corr_html_results_to_csv.py @@ -162,11 +162,14 @@ def parse_cli_args(): gn1_parser(subparsers) gn2_parser(subparsers) - return parser.parse_args() + return parser, parser.parse_args() def run(): - args = parse_cli_args() - args.func(args) + parser, args = parse_cli_args() + try: + args.func(args) + except AttributeError as _attr_err: + parser.print_help() if __name__ == "__main__": run() -- cgit v1.2.3