summaryrefslogtreecommitdiff
path: root/lib/python/qmk/cli/generate/layouts.py
diff options
context:
space:
mode:
authorZach White <skullydazed@gmail.com>2021-01-09 13:34:14 -0800
committerGitHub <noreply@github.com>2021-01-09 13:34:14 -0800
commit962bc8d9dd413690dbeadeaac971a5389697210f (patch)
tree02e7c5ebe87f466103901d72740fbf25c9d19a30 /lib/python/qmk/cli/generate/layouts.py
parentc550047ba68bd633d35b10d545ff240cf1fc9786 (diff)
Use the schema to eliminate custom code (#11108)
* use the schema to eliminate custom code * Update docs/reference_info_json.md Co-authored-by: Ryan <fauxpark@gmail.com> * make flake8 happy * bugfix * do not overwrite make vars from json Co-authored-by: Ryan <fauxpark@gmail.com>
Diffstat (limited to 'lib/python/qmk/cli/generate/layouts.py')
-rwxr-xr-xlib/python/qmk/cli/generate/layouts.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/python/qmk/cli/generate/layouts.py b/lib/python/qmk/cli/generate/layouts.py
index 273870e15c..b7baae0651 100755
--- a/lib/python/qmk/cli/generate/layouts.py
+++ b/lib/python/qmk/cli/generate/layouts.py
@@ -54,6 +54,10 @@ def generate_layouts(cli):
if kb_info_json['layouts'][layout_name]['c_macro']:
continue
+ if 'matrix' not in kb_info_json['layouts'][layout_name]['layout'][0]:
+ cli.log.debug('%s/%s: No matrix data!', cli.config.generate_layouts.keyboard, layout_name)
+ continue
+
layout_keys = []
layout_matrix = [['KC_NO' for i in range(col_num)] for i in range(row_num)]