1
0
Fork 0

[CLI] Don't exit() when certain exceptions occur. (#23442)

This commit is contained in:
Nick Brassel 2024-06-15 19:37:47 +10:00 committed by GitHub
parent d4654ab893
commit 0262161914
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 55 additions and 12 deletions

View file

@ -14,6 +14,7 @@ from qmk.keyboard import config_h, rules_mk
from qmk.commands import parse_configurator_json
from qmk.makefile import parse_rules_mk_file
from qmk.math import compute
from qmk.util import maybe_exit
true_values = ['1', 'on', 'yes']
false_values = ['0', 'off', 'no']
@ -208,7 +209,7 @@ def _validate(keyboard, info_data):
except jsonschema.ValidationError as e:
json_path = '.'.join([str(p) for p in e.absolute_path])
cli.log.error('Invalid API data: %s: %s: %s', keyboard, json_path, e.message)
exit(1)
maybe_exit(1)
def info_json(keyboard):