protocols/pyon: remove FlatFileDB

This commit is contained in:
Sebastien Bourdeauducq 2016-02-08 14:05:00 +01:00
parent 741b11c26d
commit 8a912105cb
1 changed files with 0 additions and 20 deletions

View File

@ -202,23 +202,3 @@ def load_file(filename):
"""Parses the specified file and returns the decoded Python object."""
with open(filename, "r") as f:
return decode(f.read())
class FlatFileDB:
def __init__(self, filename):
self.filename = filename
self.data = pyon.load_file(self.filename)
def save(self):
pyon.store_file(self.filename, self.data)
def get(self, key):
return self.data[key]
def set(self, key, value):
self.data[key] = value
self.save()
def delete(self, key):
del self.data[key]
self.save()