Commit bc655a9b authored by kaiyou's avatar kaiyou

Add a state function to recover all entries

parent 59df3cc7
......@@ -16,3 +16,9 @@ class State(object):
def __setitem__(self, key, value):
self.storage.set(key, json.dumps(value))
def asdict(self):
return {
key.decode("utf8"): json.loads(self.storage.get(key))
for key in self.storage.keys()
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment