forked from M-Labs/artiq
1
0
Fork 0

master/db: exclude Notifier attributes from kernel attr init

This commit is contained in:
Sebastien Bourdeauducq 2015-01-29 23:48:39 +08:00
parent c0c0137d9a
commit 45c0e2874f
1 changed files with 6 additions and 1 deletions

View File

@ -9,7 +9,7 @@ class ResultDB:
self.realtime_data = Notifier({x: [] for x in realtime_results}) self.realtime_data = Notifier({x: [] for x in realtime_results})
self.data = Notifier(dict()) self.data = Notifier(dict())
def request(self, name): def _request(self, name):
try: try:
return self.realtime_data[name] return self.realtime_data[name]
except KeyError: except KeyError:
@ -19,6 +19,11 @@ class ResultDB:
self.data[name] = [] self.data[name] = []
return self.data[name] return self.data[name]
def request(self, name):
r = self._request(name)
r.kernel_attr_init = False
return r
def set(self, name, value): def set(self, name, value):
if name in self.realtime_data.read: if name in self.realtime_data.read:
self.realtime_data[name] = value self.realtime_data[name] = value