summaryrefslogtreecommitdiff
path: root/lib/python/qmk/cli/kle2json.py
diff options
context:
space:
mode:
authorskullydazed <skullydazed@users.noreply.github.com>2020-04-18 13:00:56 -0700
committerFlorian Didron <fdidron@users.noreply.github.com>2020-06-12 17:00:27 +0900
commit1dfe06affcb723756b038f18efee35f6e30d3802 (patch)
tree7eecd9071877417133762c1e9f873793217a23af /lib/python/qmk/cli/kle2json.py
parentd424a716a061bb79335940ea9594c19b4edfa3a1 (diff)
Move everything to Python 3.6 (#8835)
Diffstat (limited to 'lib/python/qmk/cli/kle2json.py')
-rwxr-xr-xlib/python/qmk/cli/kle2json.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/python/qmk/cli/kle2json.py b/lib/python/qmk/cli/kle2json.py
index 3ed6594e0b..5268462f92 100755
--- a/lib/python/qmk/cli/kle2json.py
+++ b/lib/python/qmk/cli/kle2json.py
@@ -37,12 +37,12 @@ def kle2json(cli):
file_path = Path(os.environ['ORIG_CWD'], cli.args.filename)
# Check for valid file_path for more graceful failure
if not file_path.exists():
- return cli.log.error('File {fg_cyan}%s{style_reset_all} was not found.', str(file_path))
+ return cli.log.error('File {fg_cyan}%s{style_reset_all} was not found.', file_path)
out_path = file_path.parent
raw_code = file_path.open().read()
# Check if info.json exists, allow overwrite with force
if Path(out_path, "info.json").exists() and not cli.args.force:
- cli.log.error('File {fg_cyan}%s/info.json{style_reset_all} already exists, use -f or --force to overwrite.', str(out_path))
+ cli.log.error('File {fg_cyan}%s/info.json{style_reset_all} already exists, use -f or --force to overwrite.', out_path)
return False
try:
# Convert KLE raw to x/y coordinates (using kle2xy package from skullydazed)
@@ -69,7 +69,7 @@ def kle2json(cli):
# Replace layout in keyboard json
keyboard = keyboard.replace('"LAYOUT_JSON_HERE"', layout)
# Write our info.json
- file = open(str(out_path) + "/info.json", "w")
+ file = open(out_path + "/info.json", "w")
file.write(keyboard)
file.close()
- cli.log.info('Wrote out {fg_cyan}%s/info.json', str(out_path))
+ cli.log.info('Wrote out {fg_cyan}%s/info.json', out_path)