From 8e3a8e427954faeef5300bba07f0a1a76e76952d Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Sun, 20 Nov 2016 19:39:49 +0100 Subject: [PATCH] coverage --- tiramisu/config.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tiramisu/config.py b/tiramisu/config.py index d91c905..711e335 100644 --- a/tiramisu/config.py +++ b/tiramisu/config.py @@ -83,6 +83,8 @@ class SubConfig(object): self = self.getattr(step, force_permissive=force_permissive, returns_raise=returns_raise) + if isinstance(self, Exception): + return self, None return self, path[-1] #def __hash__(self): @@ -270,11 +272,14 @@ class SubConfig(object): homeconfig, name = self.cfgimpl_get_home_by_path( name, force_permissive=force_permissive, returns_raise=returns_raise) - cfg = homeconfig.getattr(name, force_permissive=force_permissive, - validate=validate, - _setting_properties=_setting_properties, - _self_properties=_self_properties, - index=index, returns_raise=returns_raise) + if isinstance(homeconfig, Exception): + cfg = homeconfig + else: + cfg = homeconfig.getattr(name, force_permissive=force_permissive, + validate=validate, + _setting_properties=_setting_properties, + _self_properties=_self_properties, + index=index, returns_raise=returns_raise) else: context = self._cfgimpl_get_context() option = self.cfgimpl_get_description().__getattr__(name,