support of non multi variable
This commit is contained in:
parent
6d1cf308b2
commit
b2538f6f0b
1 changed files with 7 additions and 8 deletions
|
@ -121,7 +121,7 @@ class Values(object):
|
|||
(is_frozen and
|
||||
'force_default_on_freeze' in setting[opt])):
|
||||
no_value_slave = False
|
||||
if opt.impl_get_multitype() == multitypes.slave:
|
||||
if opt.impl_is_multi() and opt.impl_get_multitype() == multitypes.slave:
|
||||
masterp = self.context.cfgimpl_get_description().impl_get_path_by_opt(
|
||||
opt.impl_get_master_slaves())
|
||||
mastervalue = getattr(self.context, masterp)
|
||||
|
@ -132,8 +132,7 @@ class Values(object):
|
|||
|
||||
if not no_value_slave:
|
||||
value = self._getcallback_value(opt)
|
||||
if opt.impl_is_multi():
|
||||
if opt.impl_get_multitype() == multitypes.slave:
|
||||
if opt.impl_is_multi() and opt.impl_get_multitype() == multitypes.slave:
|
||||
if isinstance(value, list):
|
||||
raise ValueError('callback must not return list '
|
||||
'in slave {0}: {1}'.format(opt._name,
|
||||
|
|
Loading…
Reference in a new issue