make_dict with mandatory option

This commit is contained in:
Emmanuel Garette 2018-12-07 23:30:45 +01:00
parent 5bb0c49949
commit 81490b75d9

View file

@ -575,13 +575,17 @@ class SubConfig(object):
withvalue, withvalue,
fullpath, fullpath,
pathsvalues) pathsvalues)
except PropertiesOptionError: except PropertiesOptionError as err:
if err.proptype == ['mandatory']:
raise err
pass pass
else: else:
try: try:
ret = self.getattr(name, ret = self.getattr(name,
option_bag) option_bag)
except PropertiesOptionError: except PropertiesOptionError as err:
if err.proptype == ['mandatory']:
raise err
return return
if flatten: if flatten:
name_ = option.impl_getname() name_ = option.impl_getname()