protocols/FlatFileDB: remove unneeded default_data

This commit is contained in:
Sebastien Bourdeauducq 2015-08-01 16:49:05 +08:00
parent 00cae1c23a
commit a64766a10d
1 changed files with 2 additions and 9 deletions

View File

@ -5,16 +5,9 @@ from artiq.protocols.sync_struct import Notifier
class FlatFileDB:
def __init__(self, filename, default_data=None):
def __init__(self, filename):
self.filename = filename
try:
data = pyon.load_file(self.filename)
except FileNotFoundError:
if default_data is None:
raise
else:
data = default_data
self.data = Notifier(data)
self.data = Notifier(pyon.load_file(self.filename))
self.hooks = []
def save(self):