summaryrefslogtreecommitdiffstats
path: root/lib/python/qmk/info.py
diff options
context:
space:
mode:
authorZach White <skullydazed@gmail.com>2021-09-27 10:02:54 -0700
committerGitHub <noreply@github.com>2021-09-27 10:02:54 -0700
commitfce9cb933845bf0b74d322eba02de3b76daaeb84 (patch)
treea28ffc6f3c53a4ddf1004f1a99938e2e5a42e6c3 /lib/python/qmk/info.py
parent5f38a98fa07677be960b71b8e3b0a1785effe0d8 (diff)
Cleanup issues identified by lgtm (#14459)
* cleanup issues identified by lgtm * fix the git_status check
Diffstat (limited to 'lib/python/qmk/info.py')
-rw-r--r--lib/python/qmk/info.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/python/qmk/info.py b/lib/python/qmk/info.py
index 7f3aabdc3b..1b4c42ff41 100644
--- a/lib/python/qmk/info.py
+++ b/lib/python/qmk/info.py
@@ -29,10 +29,10 @@ def info_json(keyboard):
"""Generate the info.json data for a specific keyboard.
"""
cur_dir = Path('keyboards')
- rules = parse_rules_mk_file(cur_dir / keyboard / 'rules.mk')
- if 'DEFAULT_FOLDER' in rules:
- keyboard = rules['DEFAULT_FOLDER']
- rules = parse_rules_mk_file(cur_dir / keyboard / 'rules.mk', rules)
+ root_rules_mk = parse_rules_mk_file(cur_dir / keyboard / 'rules.mk')
+
+ if 'DEFAULT_FOLDER' in root_rules_mk:
+ keyboard = root_rules_mk['DEFAULT_FOLDER']
info_data = {
'keyboard_name': str(keyboard),