Fix not returning values from safe_write functions
This commit is contained in:
parent
93590d14b7
commit
2ad7ed2ff2
1 changed files with 2 additions and 1 deletions
|
@ -232,11 +232,12 @@ class _State():
|
||||||
@wraps(func)
|
@wraps(func)
|
||||||
def inner(self, *args, **kwargs):
|
def inner(self, *args, **kwargs):
|
||||||
tmp = _State(self._dict, self._file)
|
tmp = _State(self._dict, self._file)
|
||||||
func(tmp, *args, **kwargs)
|
ret = func(tmp, *args, **kwargs)
|
||||||
_SCHEMA.validate(tmp._dict)
|
_SCHEMA.validate(tmp._dict)
|
||||||
if tmp._file:
|
if tmp._file:
|
||||||
_save(tmp._file, tmp._dict)
|
_save(tmp._file, tmp._dict)
|
||||||
self._dict = tmp._dict
|
self._dict = tmp._dict
|
||||||
|
return ret
|
||||||
|
|
||||||
return inner
|
return inner
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue