aboutsummaryrefslogtreecommitdiff
path: root/lib/python/milc.py
diff options
context:
space:
mode:
authorErovia <erovia@users.noreply.github.com>2020-01-12 11:21:49 +0100
committerskullydazed <skullydazed@users.noreply.github.com>2020-01-19 21:29:36 -0800
commite7f6e90a22306903fd38a39c95639776a9e07b5b (patch)
treeb9cc1cbd760fd7654eb9f75f632d7ba9b900c8d1 /lib/python/milc.py
parent20290a1cffc074ae41a550fa6468cb2ed1dd3027 (diff)
downloadqmk_firmware-e7f6e90a22306903fd38a39c95639776a9e07b5b.tar.gz
qmk_firmware-e7f6e90a22306903fd38a39c95639776a9e07b5b.zip
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/python/milc.py')
-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):
180 """Returns a config value, pulling from the `user` section as a fallback. 180 """Returns a config value, pulling from the `user` section as a fallback.
181 This is called when the attribute is accessed either via the get method or through [ ] index. 181 This is called when the attribute is accessed either via the get method or through [ ] index.
182 """ 182 """
183 if key in self._config and self._config[key]: 183 if key in self._config and self._config.get(key) is not None:
184 return self._config[key] 184 return self._config[key]
185 185
186 elif key in self.parent.user: 186 elif key in self.parent.user:
@@ -523,7 +523,7 @@ class MILC(object):
523 exit(1) 523 exit(1)
524 524
525 # Merge this argument into self.config 525 # Merge this argument into self.config
526 if argument in self.default_arguments: 526 if argument in self.default_arguments[section]:
527 arg_value = getattr(self.args, argument) 527 arg_value = getattr(self.args, argument)
528 if arg_value: 528 if arg_value:
529 self.config[section][argument] = arg_value 529 self.config[section][argument] = arg_value
@@ -531,7 +531,7 @@ class MILC(object):
531 if argument not in self.config[section]: 531 if argument not in self.config[section]:
532 # Check if the argument exist for this section 532 # Check if the argument exist for this section
533 arg = getattr(self.args, argument) 533 arg = getattr(self.args, argument)
534 if arg: 534 if arg is not None:
535 self.config[section][argument] = arg 535 self.config[section][argument] = arg
536 536
537 self.release_lock() 537 self.release_lock()