mirror of https://github.com/m-labs/artiq.git
protocols/FlatFileDB: remove unneeded default_data
This commit is contained in:
parent
00cae1c23a
commit
a64766a10d
|
@ -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):
|
||||||
|
|
Loading…
Reference in New Issue