mandatory warning for the toplevel
This commit is contained in:
parent
967842c239
commit
525aee85f2
|
@ -548,11 +548,11 @@ def make_dict(config, flatten=False):
|
||||||
return options
|
return options
|
||||||
|
|
||||||
def mandatory_warnings(config):
|
def mandatory_warnings(config):
|
||||||
mandatory = config._cfgimpl_mandatory
|
mandatory = config._cfgimpl_get_toplevel()._cfgimpl_mandatory
|
||||||
config._cfgimpl_mandatory = True
|
config._cfgimpl_get_toplevel()._cfgimpl_mandatory = True
|
||||||
for path in config.getpaths(mandatory=True):
|
for path in config.getpaths(mandatory=True):
|
||||||
try:
|
try:
|
||||||
value = getattr(config, path)
|
value = getattr(config, path)
|
||||||
except MandatoryError:
|
except MandatoryError:
|
||||||
yield path
|
yield path
|
||||||
config._cfgimpl_mandatory = mandatory
|
config._cfgimpl_get_toplevel()._cfgimpl_mandatory = mandatory
|
||||||
|
|
Loading…
Reference in New Issue