From a64766a10d58c37b9850e47562f9dd7c1afac4fc Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 1 Aug 2015 16:49:05 +0800 Subject: [PATCH] protocols/FlatFileDB: remove unneeded default_data --- artiq/protocols/file_db.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/artiq/protocols/file_db.py b/artiq/protocols/file_db.py index b7499587e..744eff687 100644 --- a/artiq/protocols/file_db.py +++ b/artiq/protocols/file_db.py @@ -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):