mirror of https://github.com/m-labs/artiq.git
master: consistent db function argument names
This commit is contained in:
parent
168af9589e
commit
512bc79484
|
@ -63,12 +63,13 @@ class LogForwarder:
|
|||
|
||||
|
||||
class ParentDDB:
|
||||
get = make_parent_action("get_device", "name", KeyError)
|
||||
get_ddb = make_parent_action("get_ddb", "")
|
||||
get = make_parent_action("get_device", "key", KeyError)
|
||||
|
||||
|
||||
class ParentPDB:
|
||||
get = make_parent_action("get_parameter", "name", KeyError)
|
||||
set = make_parent_action("set_parameter", "name value")
|
||||
get = make_parent_action("get_parameter", "key", KeyError)
|
||||
set = make_parent_action("set_parameter", "key value")
|
||||
|
||||
|
||||
update_rt_results = make_parent_action("update_rt_results", "mod")
|
||||
|
|
|
@ -13,19 +13,19 @@ class FlatFileDB:
|
|||
def save(self):
|
||||
pyon.store_file(self.filename, self.data.read)
|
||||
|
||||
def get(self, name):
|
||||
return self.data.read[name]
|
||||
def get(self, key):
|
||||
return self.data.read[key]
|
||||
|
||||
def set(self, name, value):
|
||||
self.data[name] = value
|
||||
def set(self, key, value):
|
||||
self.data[key] = value
|
||||
self.save()
|
||||
timestamp = time()
|
||||
for hook in self.hooks:
|
||||
hook.set(timestamp, name, value)
|
||||
hook.set(timestamp, key, value)
|
||||
|
||||
def delete(self, name):
|
||||
del self.data[name]
|
||||
def delete(self, key):
|
||||
del self.data[key]
|
||||
self.save()
|
||||
timestamp = time()
|
||||
for hook in self.hooks:
|
||||
hook.delete(timestamp, name)
|
||||
hook.delete(timestamp, key)
|
||||
|
|
Loading…
Reference in New Issue