Add ensure store in path query

This commit is contained in:
lash 2022-02-02 21:46:11 +00:00
parent f5a8c773e2
commit a95a25f745
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746
1 changed files with 4 additions and 2 deletions

View File

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