diff options
author | skullydazed <skullydazed@users.noreply.github.com> | 2020-02-17 11:42:11 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-17 11:42:11 -0800 |
commit | c66930445f7d5941eb847568288046d51f853786 (patch) | |
tree | 273f290ca81a27bbbe7bdbf90221c02ac11f42cd /lib/python/milc.py | |
parent | 58724f8dcb9eccb1c132b8ddab422790ddd26be0 (diff) |
Use pathlib everywhere we can (#7872)
* Use pathlib everywhere we can
* Update lib/python/qmk/path.py
Co-Authored-By: Erovia <Erovia@users.noreply.github.com>
* Update lib/python/qmk/path.py
Co-Authored-By: Erovia <Erovia@users.noreply.github.com>
* Improvements based on @erovia's feedback
* rework qmk compile and qmk flash to use pathlib
* style
* Remove the subcommand_name argument from find_keyboard_keymap()
Co-authored-by: Erovia <Erovia@users.noreply.github.com>
Diffstat (limited to 'lib/python/milc.py')
-rw-r--r-- | lib/python/milc.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/python/milc.py b/lib/python/milc.py index 949bb0252a..83edfc7f51 100644 --- a/lib/python/milc.py +++ b/lib/python/milc.py @@ -273,7 +273,7 @@ class MILC(object): self._inside_context_manager = False self.ansi = ansi_colors self.arg_only = [] - self.config = None + self.config = self.config_source = None self.config_file = None self.default_arguments = {} self.version = 'unknown' @@ -473,6 +473,7 @@ class MILC(object): """ self.acquire_lock() self.config = Configuration() + self.config_source = Configuration() self.config_file = self.find_config_file() if self.config_file and self.config_file.exists(): @@ -498,6 +499,7 @@ class MILC(object): value = int(value) self.config[section][option] = value + self.config_source[section][option] = 'config_file' self.release_lock() @@ -530,12 +532,14 @@ class MILC(object): arg_value = getattr(self.args, argument) if arg_value is not None: self.config[section][argument] = arg_value + self.config_source[section][argument] = 'argument' else: if argument not in self.config[entrypoint_name]: # Check if the argument exist for this section arg = getattr(self.args, argument) if arg is not None: self.config[section][argument] = arg + self.config_source[section][argument] = 'argument' self.release_lock() |