remove all try/except
This commit is contained in:
@ -622,28 +622,30 @@ class Settings(object):
|
||||
"imbrication detected for option:"
|
||||
" '{0}' with requirement on: "
|
||||
"'{1}'").format(path, reqpath))
|
||||
try:
|
||||
if option.impl_is_multi():
|
||||
idx = index
|
||||
if option.impl_is_multi():
|
||||
idx = index
|
||||
else:
|
||||
idx = None
|
||||
value = context.getattr(reqpath, force_permissive=True,
|
||||
_setting_properties=setting_properties,
|
||||
index=idx, returns_raise=True)
|
||||
if isinstance(value, Exception):
|
||||
if isinstance(value, PropertiesOptionError):
|
||||
if not transitive:
|
||||
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))
|
||||
# transitive action, force expected
|
||||
value = expected[0]
|
||||
inverse = False
|
||||
else:
|
||||
idx = None
|
||||
value = context.getattr(reqpath, force_permissive=True,
|
||||
_setting_properties=setting_properties,
|
||||
index=idx)
|
||||
except PropertiesOptionError as err:
|
||||
if not transitive:
|
||||
continue
|
||||
properties = err.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))
|
||||
# transitive action, force expected
|
||||
value = expected[0]
|
||||
inverse = False
|
||||
raise value
|
||||
if (not inverse and
|
||||
value in expected or
|
||||
inverse and value not in expected):
|
||||
|
Reference in New Issue
Block a user