better error message with requirementerror
This commit is contained in:
@ -673,12 +673,16 @@ class Settings(object):
|
||||
continue
|
||||
properties = value.proptype
|
||||
if same_action and action not in properties: # pragma: optional cover
|
||||
raise RequirementError(_("option '{0}' has "
|
||||
"requirement's property "
|
||||
"error: "
|
||||
"{1} {2}").format(opt._name,
|
||||
reqpath,
|
||||
properties))
|
||||
if len(properties) == 1:
|
||||
prop_msg = _('property')
|
||||
else:
|
||||
prop_msg = _('properties')
|
||||
raise RequirementError(_('cannot access to option "{0}" because '
|
||||
'required option "{1}" has {2} {3}'
|
||||
'').format(opt.impl_get_display_name(),
|
||||
option.impl_get_display_name(),
|
||||
prop_msg,
|
||||
display_list(properties)))
|
||||
orig_value = value
|
||||
# transitive action, force expected
|
||||
value = expected[0]
|
||||
|
Reference in New Issue
Block a user