From 81490b75d9ddf25fcd0e3285fc309f7ecccb6201 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Fri, 7 Dec 2018 23:30:45 +0100 Subject: [PATCH] make_dict with mandatory option --- tiramisu/config.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tiramisu/config.py b/tiramisu/config.py index 131e647..95f5711 100644 --- a/tiramisu/config.py +++ b/tiramisu/config.py @@ -575,13 +575,17 @@ class SubConfig(object): withvalue, fullpath, pathsvalues) - except PropertiesOptionError: + except PropertiesOptionError as err: + if err.proptype == ['mandatory']: + raise err pass else: try: ret = self.getattr(name, option_bag) - except PropertiesOptionError: + except PropertiesOptionError as err: + if err.proptype == ['mandatory']: + raise err return if flatten: name_ = option.impl_getname()