diff --git a/wkcuber/__main__.py b/wkcuber/__main__.py index 2e673a629..d9c1e4f48 100644 --- a/wkcuber/__main__.py +++ b/wkcuber/__main__.py @@ -36,8 +36,7 @@ def create_parser(): return parser -if __name__ == "__main__": - args = create_parser().parse_args() +def main(args): setup_logging(args) scale = tuple(float(x) for x in args.scale.split(",")) @@ -87,3 +86,8 @@ def create_parser(): ) refresh_metadata(args.target_path) + + +if __name__ == "__main__": + parsed_args = create_parser().parse_args() + main(parsed_args)