Better raise message

* tiramisu/config.py (Config._valid_len): use master and slave name and
  value.
This commit is contained in:
Daniel Dehennin 2013-01-30 18:04:25 +01:00
parent 184c48db8c
commit f494bb1502
1 changed files with 6 additions and 2 deletions

View File

@ -199,8 +199,12 @@ class Config(object):
return True return True
if master_len != len(slave_value): if master_len != len(slave_value):
master_name = self._cfgimpl_descr.get_master_name() master_name = self._cfgimpl_descr.get_master_name()
raise ValueError("invalid len for the group of" master_value = self._cfgimpl_values[master_name]
" the option {0}".format(slave_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): def fill_multi(self, name, result, use_default_multi=False, default_multi=None):
"""fills a multi option with default and calculated values """fills a multi option with default and calculated values