diff options
| author | Sergey Vlasov <sigprof@gmail.com> | 2023-12-06 09:59:42 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-06 17:59:42 +1100 |
| commit | 958215e9d653966cea9f67644948c46a83a82b07 (patch) | |
| tree | 3f0e3920c04ce6a48b964381d379d0e74506e08f /lib/python | |
| parent | f1043e3a92c8c0529357b5e5628cdf986ce39837 (diff) | |
Fix more `qmk generate-api` fallout from userspace support (#22619)
Diffstat (limited to 'lib/python')
| -rwxr-xr-x | lib/python/qmk/cli/generate/api.py | 5 |
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): | |||
| 128 | # Populate the list of JSON keymaps | 128 | # Populate the list of JSON keymaps |
| 129 | for keymap in list_keymaps(keyboard_name, c=False, fullpath=True): | 129 | for keymap in list_keymaps(keyboard_name, c=False, fullpath=True): |
| 130 | keymap_rel = qmk.path.under_qmk_firmware(keymap) | 130 | keymap_rel = qmk.path.under_qmk_firmware(keymap) |
| 131 | if keymap_rel is None: | ||
| 132 | cli.log.debug('Skipping keymap %s (not in qmk_firmware)', keymap) | ||
| 133 | continue | ||
| 131 | kb_json['keymaps'][keymap.name] = { | 134 | kb_json['keymaps'][keymap.name] = { |
| 132 | # TODO: deprecate 'url' as consumer needs to know its potentially hjson | 135 | # TODO: deprecate 'url' as consumer needs to know its potentially hjson |
| 133 | 'url': f'https://raw.githubusercontent.com/qmk/qmk_firmware/master/{keymap_rel}/keymap.json', | 136 | 'url': f'https://raw.githubusercontent.com/qmk/qmk_firmware/master/{keymap_rel}/keymap.json', |
| 134 | 137 | ||
| 135 | # Instead consumer should grab from API and not repo directly | 138 | # Instead consumer should grab from API and not repo directly |
| 136 | 'path': (keymap / 'keymap.json').as_posix(), | 139 | 'path': (keymap_rel / 'keymap.json').as_posix(), |
| 137 | } | 140 | } |
| 138 | 141 | ||
| 139 | keyboard_dir.mkdir(parents=True, exist_ok=True) | 142 | keyboard_dir.mkdir(parents=True, exist_ok=True) |
