diff options
author | QMK Bot <hello@qmk.fm> | 2024-06-15 09:38:16 +0000 |
---|---|---|
committer | QMK Bot <hello@qmk.fm> | 2024-06-15 09:38:16 +0000 |
commit | faa84a7c9016a76eb7d594b5ce33a62fe2b1f81e (patch) | |
tree | 88bd0ea38d2673c9c5920c74f80814bae670334f /lib/python/qmk/json_schema.py | |
parent | e31418ee119a63dbc930e4148dca92a8e9260b07 (diff) | |
parent | 0262161914133e6abfc306e675dbac3ba816a6ee (diff) |
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'lib/python/qmk/json_schema.py')
-rw-r--r-- | lib/python/qmk/json_schema.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/python/qmk/json_schema.py b/lib/python/qmk/json_schema.py index 1d5f863807..b11a0ed7ea 100644 --- a/lib/python/qmk/json_schema.py +++ b/lib/python/qmk/json_schema.py @@ -11,6 +11,8 @@ from copy import deepcopy from milc import cli +from qmk.util import maybe_exit + def _dict_raise_on_duplicates(ordered_pairs): """Reject duplicate keys.""" @@ -38,10 +40,10 @@ def _json_load_impl(json_file, strict=True): except (json.decoder.JSONDecodeError, hjson.HjsonDecodeError) as e: cli.log.error('Invalid JSON encountered attempting to load {fg_cyan}%s{fg_reset}:\n\t{fg_red}%s', json_file, e) - exit(1) + maybe_exit(1) except Exception as e: cli.log.error('Unknown error attempting to load {fg_cyan}%s{fg_reset}:\n\t{fg_red}%s', json_file, e) - exit(1) + maybe_exit(1) def json_load(json_file, strict=True): |