Add ensure store in path query
This commit is contained in:
parent
f5a8c773e2
commit
a95a25f745
@ -79,8 +79,7 @@ class PersistedState(State):
|
|||||||
state = self.state(key)
|
state = self.state(key)
|
||||||
k = self.name(state)
|
k = self.name(state)
|
||||||
|
|
||||||
self.__ensure_store(k)
|
# self.__ensure_store(k)
|
||||||
|
|
||||||
self.__stores[k].remove(key)
|
self.__stores[k].remove(key)
|
||||||
super(PersistedState, self).purge(key)
|
super(PersistedState, self).purge(key)
|
||||||
|
|
||||||
@ -89,6 +88,7 @@ class PersistedState(State):
|
|||||||
k = self.name(state)
|
k = self.name(state)
|
||||||
|
|
||||||
for o in self.__stores[k].list():
|
for o in self.__stores[k].list():
|
||||||
|
self.__ensure_store(k)
|
||||||
try:
|
try:
|
||||||
super(PersistedState, self).put(o[0], state=state, contents=o[1])
|
super(PersistedState, self).put(o[0], state=state, contents=o[1])
|
||||||
except StateItemExists:
|
except StateItemExists:
|
||||||
@ -98,6 +98,8 @@ class PersistedState(State):
|
|||||||
def path(self, state, key=None):
|
def path(self, state, key=None):
|
||||||
k = self.name(state)
|
k = self.name(state)
|
||||||
|
|
||||||
|
self.__ensure_store(k)
|
||||||
|
|
||||||
return self.__stores[k].path(key=key)
|
return self.__stores[k].path(key=key)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user