diff options
author | Ryan <fauxpark@gmail.com> | 2021-11-19 04:55:07 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-18 17:55:07 +0000 |
commit | aee10ccc5c80e71977cbbccb5b86059c87ba7d48 (patch) | |
tree | 104f6a379857beb967142c9d2e4238fff2029cba /lib/python/qmk/cli/list/layouts.py | |
parent | cd50fdf7ee6cdb1a5025f4e3e9540c0fd00499a7 (diff) | |
download | qmk_firmware-aee10ccc5c80e71977cbbccb5b86059c87ba7d48.tar.gz qmk_firmware-aee10ccc5c80e71977cbbccb5b86059c87ba7d48.zip |
[CLI] `list-keymaps`/`list-layouts`: Check keyboard passed in (#15204)
* [CLI] `list-keymaps`/`list-layouts`: Check keyboard passed in
* Update lib/python/qmk/cli/list/keymaps.py
Co-authored-by: Joel Challis <git@zvecr.com>
* Update lib/python/qmk/cli/list/layouts.py
Co-authored-by: Joel Challis <git@zvecr.com>
Co-authored-by: Joel Challis <git@zvecr.com>
Diffstat (limited to 'lib/python/qmk/cli/list/layouts.py')
-rw-r--r-- | lib/python/qmk/cli/list/layouts.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/python/qmk/cli/list/layouts.py b/lib/python/qmk/cli/list/layouts.py index 8e07afeec..df593dc39 100644 --- a/lib/python/qmk/cli/list/layouts.py +++ b/lib/python/qmk/cli/list/layouts.py | |||
@@ -13,6 +13,11 @@ from qmk.info import info_json | |||
13 | def list_layouts(cli): | 13 | def list_layouts(cli): |
14 | """List the layouts for a specific keyboard | 14 | """List the layouts for a specific keyboard |
15 | """ | 15 | """ |
16 | if not cli.config.list_layouts.keyboard: | ||
17 | cli.log.error('Missing required arguments: --keyboard') | ||
18 | cli.subcommands['list-layouts'].print_help() | ||
19 | return False | ||
20 | |||
16 | info_data = info_json(cli.config.list_layouts.keyboard) | 21 | info_data = info_json(cli.config.list_layouts.keyboard) |
17 | for name in sorted(info_data.get('community_layouts', [])): | 22 | for name in sorted(info_data.get('community_layouts', [])): |
18 | print(name) | 23 | print(name) |