core (tools/config): fixed fixConfigOption:

C.DEFAULT_CONFIG was used so the default values were written if not set in the config file used, resulting in a overriding of values set in config files of higher level (e.g. ~/.config/sat/sat.conf could override /etc/sat.conf values).
This commit is contained in:
Goffi 2016-03-09 12:11:35 +01:00
commit 0e1bf65f08

View file

@ -43,7 +43,7 @@ def fixConfigOption(section, option, value, silent=True):
@param value (str): the new value
@param silent (boolean): toggle logging output (must be True when called from sat.sh)
"""
config = SafeConfigParser(defaults=C.DEFAULT_CONFIG)
config = SafeConfigParser()
target_file = None
for file_ in C.CONFIG_FILES[::-1]:
# we will eventually update the existing file with the highest priority, if it's a user personal file...