Requires need option, not path
Valid requires
This commit is contained in:
@ -359,15 +359,17 @@ def apply_requires(opt, config):
|
||||
settings = config.cfgimpl_get_settings()
|
||||
setting = Property(settings, settings._get_properties(opt, False), opt)
|
||||
trigger_actions = build_actions(opt._requires)
|
||||
optpath = config.cfgimpl_get_context().cfgimpl_get_description().optimpl_get_path_by_opt(opt)
|
||||
descr = config.cfgimpl_get_context().cfgimpl_get_description()
|
||||
optpath = descr.optimpl_get_path_by_opt(opt)
|
||||
for requires in trigger_actions.values():
|
||||
matches = False
|
||||
for require in requires:
|
||||
if len(require) == 3:
|
||||
path, expected, action = require
|
||||
option, expected, action = require
|
||||
inverse = False
|
||||
elif len(require) == 4:
|
||||
path, expected, action, inverse = require
|
||||
option, expected, action, inverse = require
|
||||
path = descr.optimpl_get_path_by_opt(option)
|
||||
if path == optpath or path.startswith(optpath + '.'):
|
||||
raise RequirementRecursionError(_("malformed requirements "
|
||||
"imbrication detected for option: '{0}' "
|
||||
|
Reference in New Issue
Block a user