Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bbc5ffd6c9 | |||
| e0adba4e68 | |||
| 56bcb12ed6 | |||
| 897fe121e2 |
@@ -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()
|
||||
|
||||
@@ -571,7 +575,7 @@ class MILC(object):
|
||||
|
||||
# Move the new config file into place atomically
|
||||
if os.path.getsize(tmpfile.name) > 0:
|
||||
os.rename(tmpfile.name, str(self.config_file))
|
||||
os.replace(tmpfile.name, str(self.config_file))
|
||||
else:
|
||||
self.log.warning('Config file saving failed, not replacing %s with %s.', str(self.config_file), tmpfile.name)
|
||||
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
"""A program to help you work with qmk_firmware."""
|
||||
|
||||
__version__ = '0.0.27'
|
||||
__version__ = '0.0.28'
|
||||
|
||||
@@ -12,7 +12,7 @@ TWINE_USERNAME=$PYPI_USERNAME
|
||||
|
||||
export FLIT_USERNAME TWINE_USERNAME
|
||||
|
||||
rm dist/*
|
||||
rm -f dist/*
|
||||
bumpversion patch
|
||||
git push origin master --tags
|
||||
|
||||
|
||||
Reference in New Issue
Block a user