ConfigError, not PropertiesOptionError if cannot access to option in carry_out_calcul...
authorEmmanuel Garette <egarette@cadoles.com>
Wed, 12 Jun 2013 15:07:29 +0000 (17:07 +0200)
committerEmmanuel Garette <egarette@cadoles.com>
Wed, 12 Jun 2013 15:07:29 +0000 (17:07 +0200)
tiramisu/autolib.py

index 2e45d38..06a66cc 100644 (file)
@@ -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))