Fix commandline parsing and flake8 findings, rebase
Fixed commandline and config parsing. Thx @xplusplus. Rebased on master and fixed merge conflicts.
This commit is contained in:
parent
988bfffca2
commit
8eeab1112a
5 changed files with 18 additions and 5 deletions
|
@ -5,6 +5,7 @@ import os
|
|||
import qmk.path
|
||||
from qmk.errors import NoSuchKeyboardError
|
||||
|
||||
|
||||
def parse_rules_mk_file(file, rules_mk=None):
|
||||
"""Turn a rules.mk file into a dictionary.
|
||||
|
||||
|
@ -45,12 +46,13 @@ def parse_rules_mk_file(file, rules_mk=None):
|
|||
rules_mk[key.strip()] = value.strip()
|
||||
else:
|
||||
if ":=" in line:
|
||||
line.replace(":","")
|
||||
line.replace(":", "")
|
||||
key, value = line.split('=', 1)
|
||||
rules_mk[key.strip()] = value.strip()
|
||||
|
||||
return rules_mk
|
||||
|
||||
|
||||
def get_rules_mk(keyboard):
|
||||
""" Get a rules.mk for a keyboard
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue