From 9c47eb32d5efc834f36df4a1d65782950f0599ec Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Wed, 12 Jun 2013 17:07:29 +0200 Subject: [PATCH] ConfigError, not PropertiesOptionError if cannot access to option in carry_out_calculation --- tiramisu/autolib.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tiramisu/autolib.py b/tiramisu/autolib.py index 2e45d38..06a66cc 100644 --- a/tiramisu/autolib.py +++ b/tiramisu/autolib.py @@ -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))