diff options
author | Erovia <erovia@users.noreply.github.com> | 2020-01-07 21:54:21 +0100 |
---|---|---|
committer | skullydazed <skullydazed@users.noreply.github.com> | 2020-02-15 15:19:03 -0800 |
commit | 8eeab1112aa1ca7336f88867a9a2ab680ae94b53 (patch) | |
tree | 60627f2d1aa5f6bb1d3345d9dbb7268b7d6ed3eb /lib/python/qmk/cli/list | |
parent | 988bfffca2715df3f227c462533d350ecbeac6c0 (diff) |
Fix commandline parsing and flake8 findings, rebase
Fixed commandline and config parsing. Thx @xplusplus.
Rebased on master and fixed merge conflicts.
Diffstat (limited to 'lib/python/qmk/cli/list')
-rw-r--r-- | lib/python/qmk/cli/list/keymaps.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/python/qmk/cli/list/keymaps.py b/lib/python/qmk/cli/list/keymaps.py index a17c6a9130..aab9731405 100644 --- a/lib/python/qmk/cli/list/keymaps.py +++ b/lib/python/qmk/cli/list/keymaps.py @@ -4,13 +4,16 @@ from milc import cli import qmk.keymap from qmk.errors import NoSuchKeyboardError + @cli.argument("-kb", "--keyboard", help="Specify keyboard name. Example: 1upkeyboards/1up60hse") @cli.subcommand("List the keymaps for a specific keyboard") def list_keymaps(cli): """List the keymaps for a specific keyboard """ # ask for user input if keyboard was not provided in the command line - if not cli.config.list_keymaps.keyboard: + if cli.args.keyboard: + cli.config.list_keymaps.keyboard = cli.args.keyboard + elif not cli.config.list_keymaps.keyboard: cli.config.list_keymaps.keyboard = input("Keyboard Name: ") try: |