summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2023-12-06 07:00:10 +0000
committerQMK Bot <hello@qmk.fm>2023-12-06 07:00:10 +0000
commit8ba46dcf61fd935aa8273953454129ba495f01c6 (patch)
tree048c6b0d45429808ef620867811c87ad2e57de5b /lib
parent4e836dd6cf3a498196c6f07fd4075dc4bfec96e7 (diff)
parent958215e9d653966cea9f67644948c46a83a82b07 (diff)
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'lib')
-rwxr-xr-xlib/python/qmk/cli/generate/api.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/python/qmk/cli/generate/api.py b/lib/python/qmk/cli/generate/api.py
index 4a24f8f7fd..8311818476 100755
--- a/lib/python/qmk/cli/generate/api.py
+++ b/lib/python/qmk/cli/generate/api.py
@@ -128,12 +128,15 @@ def generate_api(cli):
# Populate the list of JSON keymaps
for keymap in list_keymaps(keyboard_name, c=False, fullpath=True):
keymap_rel = qmk.path.under_qmk_firmware(keymap)
+ if keymap_rel is None:
+ cli.log.debug('Skipping keymap %s (not in qmk_firmware)', keymap)
+ continue
kb_json['keymaps'][keymap.name] = {
# TODO: deprecate 'url' as consumer needs to know its potentially hjson
'url': f'https://raw.githubusercontent.com/qmk/qmk_firmware/master/{keymap_rel}/keymap.json',
# Instead consumer should grab from API and not repo directly
- 'path': (keymap / 'keymap.json').as_posix(),
+ 'path': (keymap_rel / 'keymap.json').as_posix(),
}
keyboard_dir.mkdir(parents=True, exist_ok=True)