aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorGravatar Erovia <erovia@users.noreply.github.com>2020-01-12 11:21:49 +0100
committerGravatar skullydazed <skullydazed@users.noreply.github.com>2020-01-19 21:29:36 -0800
commite7f6e90a22306903fd38a39c95639776a9e07b5b (patch)
treeb9cc1cbd760fd7654eb9f75f632d7ba9b900c8d1 /lib
parent20290a1cffc074ae41a550fa6468cb2ed1dd3027 (diff)
downloadqmk_firmware-e7f6e90a22306903fd38a39c95639776a9e07b5b.tar.gz
Fix commandline arg merging, small improvements
Commandline args should be merged with the submodule's config. Compare config values to None instead of False, so empty lines and False can be used as values.
Diffstat (limited to 'lib')
-rw-r--r--lib/python/milc.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/python/milc.py b/lib/python/milc.py
index 92b1278f4..bc08a87b6 100644
--- a/lib/python/milc.py
+++ b/lib/python/milc.py
@@ -180,7 +180,7 @@ class ConfigurationSection(Configuration):
"""Returns a config value, pulling from the `user` section as a fallback.
This is called when the attribute is accessed either via the get method or through [ ] index.
"""
- if key in self._config and self._config[key]:
+ if key in self._config and self._config.get(key) is not None:
return self._config[key]
elif key in self.parent.user:
@@ -523,7 +523,7 @@ class MILC(object):
exit(1)
# Merge this argument into self.config
- if argument in self.default_arguments:
+ if argument in self.default_arguments[section]:
arg_value = getattr(self.args, argument)
if arg_value:
self.config[section][argument] = arg_value
@@ -531,7 +531,7 @@ class MILC(object):
if argument not in self.config[section]:
# Check if the argument exist for this section
arg = getattr(self.args, argument)
- if arg:
+ if arg is not None:
self.config[section][argument] = arg
self.release_lock()