valid default/callback value in consistencies
This commit is contained in:
@ -454,18 +454,32 @@ class Option(OnlyOption):
|
||||
elif self.impl_is_submulti():
|
||||
try:
|
||||
all_cons_vals.append(opt_value[index][submulti_index])
|
||||
except IndexError:
|
||||
except IndexError, err:
|
||||
log.debug('indexerror in submulti opt in _launch_consistency: {0}'.format(err))
|
||||
#value is not already set, could be higher index
|
||||
#so return if no value
|
||||
return
|
||||
else:
|
||||
try:
|
||||
all_cons_vals.append(opt_value[index])
|
||||
except IndexError:
|
||||
except IndexError, err:
|
||||
log.debug('indexerror in _launch_consistency: {0}'.format(err))
|
||||
#value is not already set, could be higher index
|
||||
#so return if no value
|
||||
return
|
||||
#so return if no value and not default_value
|
||||
if context is not undefined:
|
||||
if isinstance(opt, DynSymLinkOption):
|
||||
path = opt.impl_getpath(context)
|
||||
else:
|
||||
path = descr.impl_get_path_by_opt(opt)
|
||||
default_value = context.cfgimpl_get_values()._getvalue(opt, path, True, index=index)
|
||||
else:
|
||||
default_value = opt.impl_getdefault_multi()
|
||||
if default_value is not None:
|
||||
all_cons_vals.append(default_value)
|
||||
else:
|
||||
return
|
||||
except PropertiesOptionError as err:
|
||||
log.debug('propertyerror in _launch_consistency: {0}'.format(err))
|
||||
if transitive:
|
||||
raise err
|
||||
else:
|
||||
|
Reference in New Issue
Block a user