summaryrefslogtreecommitdiff
path: root/lib/python/qmk
diff options
context:
space:
mode:
authorZach White <skullydazed@gmail.com>2021-08-09 08:34:14 -0700
committerZach White <skullydazed@gmail.com>2021-08-09 08:34:14 -0700
commit12681bacc4b2d845bd01b0e65b00e3d8775ac515 (patch)
treedecee0f1907bd93bd36d0349d72dda34da9c06f5 /lib/python/qmk
parent65e376085356c18382d6a5d8dc54c8461144152e (diff)
parente6c171bdd639fef41a68902ce5a379a0565ed99b (diff)
Merge remote-tracking branch 'origin/master' into develop
Conflicts: keyboards/kbdfans/kbd67/mkiirgb/mkiirgb.c
Diffstat (limited to 'lib/python/qmk')
-rw-r--r--lib/python/qmk/info.py2
-rw-r--r--lib/python/qmk/json_schema.py5
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/python/qmk/info.py b/lib/python/qmk/info.py
index bcb4d81ef2..7f9907a50f 100644
--- a/lib/python/qmk/info.py
+++ b/lib/python/qmk/info.py
@@ -74,7 +74,7 @@ def info_json(keyboard):
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()
+ exit(1)
# Make sure we have at least one layout
if not info_data.get('layouts'):
diff --git a/lib/python/qmk/json_schema.py b/lib/python/qmk/json_schema.py
index 3e5663a291..cbc5bff518 100644
--- a/lib/python/qmk/json_schema.py
+++ b/lib/python/qmk/json_schema.py
@@ -17,9 +17,12 @@ def json_load(json_file):
try:
return hjson.load(json_file.open(encoding='utf-8'))
- except json.decoder.JSONDecodeError as e:
+ 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)
+ 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)
def load_jsonschema(schema_name):