ConfigError, not PropertiesOptionError if cannot access to option in carry_out_calculation
This commit is contained in:
parent
0d114001f4
commit
9c47eb32d5
1 changed files with 6 additions and 3 deletions
|
@ -53,16 +53,19 @@ def carry_out_calculation(name, config, callback, callback_params, index=None):
|
|||
except PropertiesOptionError, err:
|
||||
if check_disabled:
|
||||
continue
|
||||
raise PropertiesOptionError(err, err.proptype)
|
||||
raise ConfigError(_('unable to carry out a calculation, '
|
||||
'option {0} has properties: {1} for: '
|
||||
'{2}').format(opt._name, err.proptype,
|
||||
name))
|
||||
is_multi = opt.impl_is_multi()
|
||||
if is_multi:
|
||||
if opt_value is not None:
|
||||
len_value = len(opt_value)
|
||||
if len_multi != 0 and len_multi != len_value:
|
||||
raise ConfigError('unable to carry out a '
|
||||
raise ConfigError(_('unable to carry out a '
|
||||
'calculation, option values with'
|
||||
' multi types must have same '
|
||||
'length for: ' + name)
|
||||
'length for: {0}').format(name))
|
||||
len_multi = len_value
|
||||
one_is_multi = True
|
||||
tcparams.setdefault(key, []).append((opt_value, is_multi))
|
||||
|
|
Loading…
Reference in a new issue