add context property force_store_value

This commit is contained in:
2019-02-21 19:33:39 +01:00
parent 0a3b0e913f
commit 04b7d2bbc9
7 changed files with 64 additions and 25 deletions

View File

@ -102,14 +102,16 @@ read_write
you can set all variables not frozen
"""
ro_append = set(['frozen', 'disabled', 'validator', 'everything_frozen',
'mandatory', 'empty'])
'mandatory', 'empty', 'force_store_value'])
ro_remove = set(['permissive', 'hidden'])
rw_append = set(['frozen', 'disabled', 'validator', 'hidden'])
rw_append = set(['frozen', 'disabled', 'validator', 'hidden',
'force_store_value'])
rw_remove = set(['permissive', 'everything_frozen', 'mandatory', 'empty'])
FORBIDDEN_SET_PROPERTIES = frozenset(['force_store_value'])
FORBIDDEN_SET_PERMISSIVES = frozenset(['force_default_on_freeze', 'force_default_on_freeze'])
FORBIDDEN_SET_PERMISSIVES = frozenset(['force_default_on_freeze',
'force_store_value'])
log = getLogger('tiramisu')
@ -711,7 +713,8 @@ class Settings(object):
config_permissives):
properties = option_properties & config_properties - {'frozen',
'mandatory',
'empty'}
'empty',
'force_store_value'}
# remove global permissive properties
if properties and ('permissive' in config_properties):
properties -= config_permissives