aboutsummaryrefslogtreecommitdiff
path: root/lib/python/qmk/cli/kle2json.py
diff options
context:
space:
mode:
authorZach White <skullydazed@gmail.com>2021-02-27 12:00:50 -0800
committerGitHub <noreply@github.com>2021-02-27 12:00:50 -0800
commit1581ea48dcd48d0d3f42cc09b388c468aedec45d (patch)
tree2d028036a4bf80c2e47b952931544f95ba2174e9 /lib/python/qmk/cli/kle2json.py
parent23ed6c4ec0bfb27612da8a7b78d1b484acc23f3f (diff)
downloadqmk_firmware-1581ea48dcd48d0d3f42cc09b388c468aedec45d.tar.gz
qmk_firmware-1581ea48dcd48d0d3f42cc09b388c468aedec45d.zip
Fix develop (#12039)
Fixes file encoding errors on Windows, and layouts not correctly merging into info.json. * force utf8 encoding * correctly merge layouts and layout aliases * show what aliases point to
Diffstat (limited to 'lib/python/qmk/cli/kle2json.py')
-rwxr-xr-xlib/python/qmk/cli/kle2json.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/python/qmk/cli/kle2json.py b/lib/python/qmk/cli/kle2json.py
index 66d504bfc..3bb744358 100755
--- a/lib/python/qmk/cli/kle2json.py
+++ b/lib/python/qmk/cli/kle2json.py
@@ -27,7 +27,7 @@ def kle2json(cli):
27 cli.log.error('File {fg_cyan}%s{style_reset_all} was not found.', file_path) 27 cli.log.error('File {fg_cyan}%s{style_reset_all} was not found.', file_path)
28 return False 28 return False
29 out_path = file_path.parent 29 out_path = file_path.parent
30 raw_code = file_path.open().read() 30 raw_code = file_path.read_text(encoding='utf-8')
31 # Check if info.json exists, allow overwrite with force 31 # Check if info.json exists, allow overwrite with force
32 if Path(out_path, "info.json").exists() and not cli.args.force: 32 if Path(out_path, "info.json").exists() and not cli.args.force:
33 cli.log.error('File {fg_cyan}%s/info.json{style_reset_all} already exists, use -f or --force to overwrite.', out_path) 33 cli.log.error('File {fg_cyan}%s/info.json{style_reset_all} already exists, use -f or --force to overwrite.', out_path)