From 9a5b8a5f630220553b45245319b78dec2412b5d2 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Wed, 19 Apr 2017 21:47:12 +0200 Subject: [PATCH] don't validate variable in _getvalue --- tiramisu/value.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/tiramisu/value.py b/tiramisu/value.py index 716ad30..726ca4c 100644 --- a/tiramisu/value.py +++ b/tiramisu/value.py @@ -124,11 +124,11 @@ class Values(object): force_default = 'frozen' in self_properties and \ 'force_default_on_freeze' in self_properties # not default value - is_default = self._is_default_owner(opt, path, session, - validate_properties=False, - validate_meta=False, - self_properties=self_properties, - index=index) + if index is None or not opt.impl_is_master_slaves('slave'): + _index = None + else: + _index = index + is_default = self._p_.getowner(path, owners.default, session, only_default=True, index=_index) == owners.default if not is_default and not force_default: if opt.impl_is_master_slaves('slave'): return self._p_.getvalue(path, session, index) @@ -515,7 +515,8 @@ class Values(object): return owners.default if validate_properties: value = self._get_cached_value(opt, path, True, force_permissive, None, True, - self_properties=self_properties, session=session) + self_properties=self_properties, session=session, + index=index) if isinstance(value, Exception): raise value @@ -578,8 +579,6 @@ class Values(object): def _is_default_owner(self, opt, path, session, validate_properties=True, validate_meta=True, self_properties=undefined, index=None, force_permissive=False): - if not opt.impl_is_master_slaves('slave'): - index = None d = self._getowner(opt, path, session, validate_properties=validate_properties, validate_meta=validate_meta, self_properties=self_properties, only_default=True,