Optional config source description

This commit is contained in:
Unrud 2020-01-15 03:19:44 +01:00
parent 514cd2b7cd
commit 41a91f7da1

View File

@ -313,7 +313,7 @@ class Configuration:
values[section][option] = schema[section][option]["value"]
self.update(values, "default config", internal=True)
def update(self, config, source, internal=False):
def update(self, config, source=None, internal=False):
"""Update the configuration.
``config`` a dict of the format {SECTION: {OPTION: VALUE, ...}, ...}.
@ -327,6 +327,7 @@ class Configuration:
``internal`` allows updating "_internal" sections.
"""
source = source or "unspecified config"
new_values = {}
for section in config:
if (section not in self._schema or not internal and