From 8345a4651d73c00dfbbb256bafdb7e87b8c2a4c7 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Mon, 2 Dec 2019 10:40:17 +0100 Subject: [PATCH] can get uncalculated property --- tiramisu/setting.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tiramisu/setting.py b/tiramisu/setting.py index 93f754e..f8664c6 100644 --- a/tiramisu/setting.py +++ b/tiramisu/setting.py @@ -424,7 +424,8 @@ class Settings(object): def getproperties(self, option_bag, - apply_requires=True): + apply_requires=True, + uncalculated=False): """ """ option = option_bag.option @@ -433,8 +434,7 @@ class Settings(object): option = option.impl_getopt() path = option.impl_getpath() index = option_bag.index - - if apply_requires: + if apply_requires and not uncalculated: cache = config_bag.context._impl_properties_cache config_bag_props = config_bag.properties is_cached, props, validated = cache.getcache(path, @@ -456,7 +456,7 @@ class Settings(object): index, option.impl_getproperties())) for prop in p_props: - if isinstance(prop, str): + if uncalculated or isinstance(prop, str): props.add(prop) elif apply_requires: new_prop = prop.execute(option_bag, @@ -471,7 +471,7 @@ class Settings(object): raise LeadershipError(_('leader cannot have "{}" property').format(new_prop)) props.add(new_prop) props -= self.getpermissives(option_bag) - if apply_requires and not config_bag.is_unrestraint: + if not uncalculated and apply_requires and not config_bag.is_unrestraint: cache.setcache(path, index, props,