From 78f01eef2e4586f59b56703d0a4f1a57a1af40a1 Mon Sep 17 00:00:00 2001 From: "St. John Johnson" Date: Sat, 5 Oct 2019 23:41:15 -0700 Subject: Use `keymap` instead of `username` variable for `qmk new_keymap` (#6885) Username is not defined and this causes `qmk new_keymap` to error. This appears to have originated from a partial update in https://github.com/qmk/qmk_firmware/pull/6708/files#diff-d5208bcbc79aa428556a743b6ff41086. This change completes the migration from `username` to `keymap` --- lib/python/qmk/cli/new/keymap.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/python/qmk/cli/new/keymap.py b/lib/python/qmk/cli/new/keymap.py index 5efb81c93f..96525e28e1 100755 --- a/lib/python/qmk/cli/new/keymap.py +++ b/lib/python/qmk/cli/new/keymap.py @@ -12,14 +12,14 @@ from milc import cli def new_keymap(cli): """Creates a new keymap for the keyboard of your choosing. """ - # ask for user input if keyboard or username was not provided in the command line + # ask for user input if keyboard or keymap was not provided in the command line keyboard = cli.config.new_keymap.keyboard if cli.config.new_keymap.keyboard else input("Keyboard Name: ") keymap = cli.config.new_keymap.keymap if cli.config.new_keymap.keymap else input("Keymap Name: ") # generate keymap paths kb_path = os.path.join(os.getcwd(), "keyboards", keyboard) keymap_path_default = os.path.join(kb_path, "keymaps/default") - keymap_path = os.path.join(kb_path, "keymaps/%s" % username) + keymap_path = os.path.join(kb_path, "keymaps/%s" % keymap) # check directories if not os.path.exists(kb_path): @@ -36,5 +36,5 @@ def new_keymap(cli): shutil.copytree(keymap_path_default, keymap_path, symlinks=True) # end message to user - cli.log.info("%s keymap directory created in: %s", username, keymap_path) - cli.log.info("Compile a firmware with your new keymap by typing: \n" + "qmk compile -kb %s -km %s", keyboard, username) + cli.log.info("%s keymap directory created in: %s", keymap, keymap_path) + cli.log.info("Compile a firmware with your new keymap by typing: \n" + "qmk compile -kb %s -km %s", keyboard, keymap) -- cgit v1.2.3