demoting_error_warning is not more mandatory in option.dict()
RequirementError returns proptype better submulti support for valid_mandatory
This commit is contained in:
@ -579,12 +579,14 @@ class Settings(object):
|
||||
prop_msg = _('property')
|
||||
else:
|
||||
prop_msg = _('properties')
|
||||
raise RequirementError(_('cannot access to option "{0}" because '
|
||||
err = RequirementError(_('cannot access to option "{0}" because '
|
||||
'required option "{1}" has {2} {3}'
|
||||
'').format(option_bag.option.impl_get_display_name(),
|
||||
option.impl_get_display_name(),
|
||||
prop_msg,
|
||||
display_list(list(properties), add_quote=True)))
|
||||
err.proptype = properties
|
||||
raise err
|
||||
# transitive action, add action
|
||||
if operator != 'and':
|
||||
if readable:
|
||||
@ -778,12 +780,11 @@ class Settings(object):
|
||||
if 'mandatory' in option_bag.config_bag.properties:
|
||||
values = option_bag.config_bag.context.cfgimpl_get_values()
|
||||
is_mandatory = False
|
||||
if ('permissive' in option_bag.config_bag.properties) and \
|
||||
'mandatory' in option_bag.config_bag.permissives:
|
||||
pass
|
||||
elif 'mandatory' in option_bag.properties and values.isempty(option_bag.option,
|
||||
value,
|
||||
index=option_bag.index):
|
||||
if not ('permissive' in option_bag.config_bag.properties and
|
||||
'mandatory' in option_bag.config_bag.permissives) and \
|
||||
'mandatory' in option_bag.properties and values.isempty(option_bag.option,
|
||||
value,
|
||||
index=option_bag.index):
|
||||
is_mandatory = True
|
||||
if 'empty' in option_bag.properties and values.isempty(option_bag.option,
|
||||
value,
|
||||
|
Reference in New Issue
Block a user