diff --git a/tiramisu/option/portoption.py b/tiramisu/option/portoption.py index c277344..eb36517 100644 --- a/tiramisu/option/portoption.py +++ b/tiramisu/option/portoption.py @@ -19,11 +19,8 @@ # the whole pypy projet is under MIT licence # ____________________________________________________________ import re -import sys -from ..setting import undefined, Undefined, OptionBag from ..i18n import _ -from .option import Option from .stroption import StrOption diff --git a/tiramisu/setting.py b/tiramisu/setting.py index 36a4abe..50e25df 100644 --- a/tiramisu/setting.py +++ b/tiramisu/setting.py @@ -117,6 +117,7 @@ FORBIDDEN_SET_PERMISSIVES = frozenset(['force_default_on_freeze', 'force_metaconfig_on_freeze', 'force_store_value']) ALLOWED_LEADER_PROPERTIES = frozenset(['empty', + 'notempty', 'notunique', 'unique', 'force_store_value', diff --git a/tiramisu/value.py b/tiramisu/value.py index 21e8ccf..e67b7f4 100644 --- a/tiramisu/value.py +++ b/tiramisu/value.py @@ -175,7 +175,11 @@ class Values: value, reset_cache=True): if isinstance(value, Calculation): - value = await value.execute(option_bag) + try: + value = await value.execute(option_bag) + except ConfigError as err: + msg = _(f'error when calculating "{option_bag.option.impl_get_display_name()}": {err} : {option_bag.path}') + raise ConfigError(msg) from err elif isinstance(value, (list, tuple)): value = await self._do_value_list(value, option_bag) if reset_cache: