summaryrefslogtreecommitdiff
path: root/lib/python/qmk
diff options
context:
space:
mode:
authorErovia <Erovia@users.noreply.github.com>2021-05-30 16:17:40 +0100
committerGitHub <noreply@github.com>2021-05-30 16:17:40 +0100
commit305cca9a5e4c304b0883f07ab4e5de9a493fdbd9 (patch)
treed5600580a30829015d172bef5245d81eec68c7ff /lib/python/qmk
parent1646c0f26cfa21a7023d404008e4d0aa4917193d (diff)
downloadqmk_firmware-305cca9a5e4c304b0883f07ab4e5de9a493fdbd9.tar.gz
qmk_firmware-305cca9a5e4c304b0883f07ab4e5de9a493fdbd9.zip
CLI: Fix automagic (#13046)
Diffstat (limited to 'lib/python/qmk')
-rw-r--r--lib/python/qmk/decorators.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/python/qmk/decorators.py b/lib/python/qmk/decorators.py
index 8d43ae980f..f6270990b9 100644
--- a/lib/python/qmk/decorators.py
+++ b/lib/python/qmk/decorators.py
@@ -17,12 +17,12 @@ def automagic_keyboard(func):
@functools.wraps(func)
def wrapper(*args, **kwargs):
# Ensure that `--keyboard` was not passed and CWD is under `qmk_firmware/keyboards`
- if cli.config_source[cli._entrypoint.__name__]['keyboard'] != 'argument':
+ if cli.config_source[cli._subcommand.__name__]['keyboard'] != 'argument':
keyboard = find_keyboard_from_dir()
if keyboard:
- cli.config[cli._entrypoint.__name__]['keyboard'] = keyboard
- cli.config_source[cli._entrypoint.__name__]['keyboard'] = 'keyboard_directory'
+ cli.config[cli._subcommand.__name__]['keyboard'] = keyboard
+ cli.config_source[cli._subcommand.__name__]['keyboard'] = 'keyboard_directory'
return func(*args, **kwargs)
@@ -37,12 +37,12 @@ def automagic_keymap(func):
@functools.wraps(func)
def wrapper(*args, **kwargs):
# Ensure that `--keymap` was not passed and that we're under `qmk_firmware`
- if cli.config_source[cli._entrypoint.__name__]['keymap'] != 'argument':
+ if cli.config_source[cli._subcommand.__name__]['keymap'] != 'argument':
keymap_name, keymap_type = find_keymap_from_dir()
if keymap_name:
- cli.config[cli._entrypoint.__name__]['keymap'] = keymap_name
- cli.config_source[cli._entrypoint.__name__]['keymap'] = keymap_type
+ cli.config[cli._subcommand.__name__]['keymap'] = keymap_name
+ cli.config_source[cli._subcommand.__name__]['keymap'] = keymap_type
return func(*args, **kwargs)