Optional config source description
This commit is contained in:
parent
514cd2b7cd
commit
41a91f7da1
@ -313,7 +313,7 @@ class Configuration:
|
|||||||
values[section][option] = schema[section][option]["value"]
|
values[section][option] = schema[section][option]["value"]
|
||||||
self.update(values, "default config", internal=True)
|
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.
|
"""Update the configuration.
|
||||||
|
|
||||||
``config`` a dict of the format {SECTION: {OPTION: VALUE, ...}, ...}.
|
``config`` a dict of the format {SECTION: {OPTION: VALUE, ...}, ...}.
|
||||||
@ -327,6 +327,7 @@ class Configuration:
|
|||||||
``internal`` allows updating "_internal" sections.
|
``internal`` allows updating "_internal" sections.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
source = source or "unspecified config"
|
||||||
new_values = {}
|
new_values = {}
|
||||||
for section in config:
|
for section in config:
|
||||||
if (section not in self._schema or not internal and
|
if (section not in self._schema or not internal and
|
||||||
|
Loading…
Reference in New Issue
Block a user