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

View File

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