From 4ee9cc82b29580437753b0b502cf467da05f838d Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Wed, 4 Apr 2018 22:00:10 +0200 Subject: [PATCH] start added recursive to option.list() --- tiramisu/api.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/tiramisu/api.py b/tiramisu/api.py index e445db8..bd7cd25 100644 --- a/tiramisu/api.py +++ b/tiramisu/api.py @@ -788,10 +788,20 @@ class TiramisuContextOption(TiramisuContext): group_type=None, recursive=False): if type == 'optiondescription': - return self.config_bag.config.iter_groups(self.config_bag, group_type) + if recursive: + raise APIError(_('not implemented yet')) + else: + return self.config_bag.config.iter_groups(self.config_bag, group_type) elif type == 'all': - return self.config_bag.config.cfgimpl_get_children(recursive, - self.config_bag) + if group_type: + raise APIError(_('not implemented yet')) + if recursive: + if not self.config_bag.force_unrestraint: + raise APIError(_('not implemented yet')) + else: + return self.config_bag.config.cfgimpl_get_description()._cache_paths[1] + else: + return self.config_bag.config.cfgimpl_get_children(self.config_bag) else: raise APIError(_('unknown list type {}').format(type))