Better raise message
authorDaniel Dehennin <daniel.dehennin@ac-dijon.fr>
Wed, 30 Jan 2013 17:04:25 +0000 (18:04 +0100)
committerDaniel Dehennin <daniel.dehennin@ac-dijon.fr>
Wed, 30 Jan 2013 17:04:55 +0000 (18:04 +0100)
* tiramisu/config.py (Config._valid_len): use master and slave name and
  value.

tiramisu/config.py

index 9e254d9..afad3d5 100644 (file)
@@ -199,8 +199,12 @@ class Config(object):
             return True
         if master_len != len(slave_value):
             master_name = self._cfgimpl_descr.get_master_name()
-            raise ValueError("invalid len for the group of"
-                    " the option {0}".format(slave_name))
+            master_value = self._cfgimpl_values[master_name]
+            raise ValueError("invalid len of '{0}={1}' for the group of"
+                             " '{2}={3}'".format(slave_name,
+                                                 slave_value,
+                                                 master_name,
+                                                 master_value))
 
     def fill_multi(self, name, result, use_default_multi=False, default_multi=None):
         """fills a multi option with default and calculated values