add force_permissive in mandatory_warnings
This commit is contained in:
@ -734,8 +734,3 @@ class MetaConfig(GroupConfig):
|
||||
child._impl_meta = weakref.ref(self)
|
||||
|
||||
super(MetaConfig, self).__init__(children, session_id, persistent, descr)
|
||||
|
||||
|
||||
def mandatory_warnings(config): # pragma: optional cover
|
||||
#only for retro-compatibility
|
||||
return config.cfgimpl_get_values().mandatory_warnings()
|
||||
|
@ -441,7 +441,7 @@ class Values(object):
|
||||
raise ValueError(_("information's item"
|
||||
" not found: {0}").format(key))
|
||||
|
||||
def mandatory_warnings(self):
|
||||
def mandatory_warnings(self, force_permissive=False):
|
||||
"""convenience function to trace Options that are mandatory and
|
||||
where no value has been set
|
||||
|
||||
@ -462,7 +462,8 @@ class Values(object):
|
||||
path = opt.impl_getpath(self._getcontext())
|
||||
try:
|
||||
self._get_cached_item(opt, path=path,
|
||||
force_properties=frozenset(('mandatory',)))
|
||||
force_properties=frozenset(('mandatory',)),
|
||||
force_permissive=force_permissive)
|
||||
except PropertiesOptionError as err:
|
||||
if err.proptype == ['mandatory']:
|
||||
_ret.append(path)
|
||||
|
Reference in New Issue
Block a user