From e643a96a512ed03eadf98afa00c4280875f36203 Mon Sep 17 00:00:00 2001 From: Robert Bartel Date: Fri, 14 Jun 2024 11:33:11 -0400 Subject: [PATCH] Use RuntimeError for bad command in py_funcs.py. Switching to use this instead of ValueError if command arg doesn't match something supported by main(), and making message reflect the situation a little better. --- docker/main/ngen/py_funcs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/main/ngen/py_funcs.py b/docker/main/ngen/py_funcs.py index 7f8d83419..fcd300fae 100644 --- a/docker/main/ngen/py_funcs.py +++ b/docker/main/ngen/py_funcs.py @@ -303,7 +303,7 @@ def main(): elif args.command == 'move_job_output': move_job_output(**(vars(args))) else: - raise ValueError("Unsupported command {}".format(args.command)) + raise RuntimeError(f"Command arg '{args.command}' doesn't match a command supported by module's main function") if __name__ == '__main__':