From 6c62c6edb1a200d346221f2f7bfba42bbe78236f Mon Sep 17 00:00:00 2001 From: Jeremy McCormick Date: Wed, 3 Jan 2024 14:20:43 -0600 Subject: [PATCH] Use click Exit instead of sys exit --- python/felis/cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/felis/cli.py b/python/felis/cli.py index 40b7b020..f8d566be 100644 --- a/python/felis/cli.py +++ b/python/felis/cli.py @@ -150,12 +150,12 @@ def load_tap( schema_obj = {"@context": DEFAULT_CONTEXT, "@graph": top_level_object} else: logger.error("Schema object not of recognizable type") - sys.exit(1) + raise click.exceptions.Exit(1) normalized = _normalize(schema_obj) if len(normalized["@graph"]) > 1 and (schema_name or catalog_name): logger.error("--schema-name and --catalog-name incompatible with multiple schemas") - sys.exit(1) + raise click.exceptions.Exit(1) # Force normalized["@graph"] to a list, which is what happens when there's # multiple schemas