shep

Multi-state key stores using bit masks for python3
git clone git://git.defalsify.org/shep.git
Log | Files | Refs | LICENSE

commit a95a25f7456171b6e2c561e2f55a6cd22eec1733
parent f5a8c773e2e8b1bd9f751b59812291dced76c2bf
Author: lash <dev@holbrook.no>
Date:   Wed,  2 Feb 2022 21:46:11 +0000

Add ensure store in path query

Diffstat:
Mshep/persist.py | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/shep/persist.py b/shep/persist.py @@ -79,8 +79,7 @@ class PersistedState(State): state = self.state(key) k = self.name(state) - self.__ensure_store(k) - +# self.__ensure_store(k) self.__stores[k].remove(key) super(PersistedState, self).purge(key) @@ -89,6 +88,7 @@ class PersistedState(State): k = self.name(state) for o in self.__stores[k].list(): + self.__ensure_store(k) try: super(PersistedState, self).put(o[0], state=state, contents=o[1]) except StateItemExists: @@ -98,6 +98,8 @@ class PersistedState(State): def path(self, state, key=None): k = self.name(state) + self.__ensure_store(k) + return self.__stores[k].path(key=key)