mirror of https://github.com/m-labs/artiq.git
master/dataset_db: support keeping old persist flag
This commit is contained in:
parent
4c8a8357b0
commit
fdc25777da
|
@ -57,7 +57,12 @@ class DatasetDB(TaskObject):
|
||||||
process_mod(self.data, mod)
|
process_mod(self.data, mod)
|
||||||
|
|
||||||
# convenience functions (update() can be used instead)
|
# convenience functions (update() can be used instead)
|
||||||
def set(self, key, value, persist=False):
|
def set(self, key, value, persist=None):
|
||||||
|
if persist is None:
|
||||||
|
if key in self.data.read:
|
||||||
|
persist = self.data.read[key][0]
|
||||||
|
else:
|
||||||
|
persist = False
|
||||||
self.data[key] = (persist, value)
|
self.data[key] = (persist, value)
|
||||||
|
|
||||||
def delete(self, key):
|
def delete(self, key):
|
||||||
|
|
Loading…
Reference in New Issue