can use requires with self option
This commit is contained in:
@ -481,7 +481,7 @@ class Settings(object):
|
||||
for option, expected in exps:
|
||||
reqpath = option.impl_getpath(context)
|
||||
#FIXME c'est un peut tard !
|
||||
if reqpath == path or reqpath.startswith(path + '.'):
|
||||
if reqpath.startswith(path + '.'):
|
||||
raise RequirementError(_("malformed requirements "
|
||||
"imbrication detected for option:"
|
||||
" '{0}' with requirement on: "
|
||||
@ -493,8 +493,13 @@ class Settings(object):
|
||||
elif option.impl_is_multi():
|
||||
is_indexed = True
|
||||
sconfig_bag = config_bag.copy('nooption')
|
||||
if config_bag.option == option:
|
||||
sconfig_bag.setting_properties = None
|
||||
sconfig_bag.force_unrestraint= False
|
||||
sconfig_bag.validate = False
|
||||
else:
|
||||
sconfig_bag.force_permissive = True
|
||||
sconfig_bag.option = option
|
||||
sconfig_bag.force_permissive = True
|
||||
try:
|
||||
value = context.getattr(reqpath,
|
||||
idx,
|
||||
|
Reference in New Issue
Block a user