diff --git a/tiramisu/value.py b/tiramisu/value.py index db3b8f8..4ebc073 100644 --- a/tiramisu/value.py +++ b/tiramisu/value.py @@ -20,7 +20,8 @@ # the rough pypy's guys: http://codespeak.net/svn/pypy/dist/pypy/config/ # the whole pypy projet is under MIT licence # ____________________________________________________________ -from tiramisu.error import NoValueReturned, MandatoryError, MultiTypeError +from tiramisu.error import NoValueReturned, MandatoryError, MultiTypeError, \ + ConfigError from tiramisu.setting import owners, multitypes class Values(object): @@ -161,12 +162,12 @@ class Values(object): # this result **shall not** be a list if isinstance(result, list): raise ConfigError('invalid calculated value returned ' - 'for option {0} : shall not be a list'.format(name)) + 'for option {0} : shall not be a list'.format(opt._name)) value = result if value != None and not opt.validate(value, self.context._cfgimpl_settings.validator): raise ConfigError('invalid calculated value returned' - ' for option {0}'.format(name)) + ' for option {0}'.format(opt._name)) # frozen and force default if not opt.has_callback() and opt.is_forced_on_freeze(): value = opt.getdefault()