replace direct write with proxy function for future locking

This commit is contained in:
Thorsten S
2015-12-21 10:41:58 +01:00
parent ff11d522b1
commit 0127a9cf26
4 changed files with 14 additions and 11 deletions

View File

@@ -51,7 +51,7 @@ def conf_set(key, val):
def runtimeconf_set(key, value):
runtime_config_store[key] = value
runtime_config_store.write()
runtimeconf_persist()
def runtimeconf_get(key, default=None):
@@ -61,6 +61,10 @@ def runtimeconf_get(key, default=None):
return runtime_config_store.get(key, default=default)
def runtimeconf_persist():
runtime_config_store.write()
def runtimeconf_deepget(key, default=None):
if '.' not in key:
return runtimeconf_get(key, default)