don't validate variable in _getvalue

This commit is contained in:
Emmanuel Garette 2017-04-19 21:47:12 +02:00
parent c32afed522
commit 9a5b8a5f63

View file

@ -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,