mirror of https://github.com/m-labs/artiq.git
browser: robustify loading
This commit is contained in:
parent
5ebdd5c106
commit
40b47b8440
|
@ -116,13 +116,9 @@ class FilesDock(QtWidgets.QDockWidget):
|
||||||
return
|
return
|
||||||
logger.info("loading datasets from %s", info.filePath())
|
logger.info("loading datasets from %s", info.filePath())
|
||||||
with f:
|
with f:
|
||||||
rd = {}
|
if "datasets" not in f:
|
||||||
try:
|
|
||||||
group = f["datasets"]
|
|
||||||
except KeyError:
|
|
||||||
return
|
return
|
||||||
for k in f["datasets"]:
|
rd = dict((k, (True, v.value)) for k, v in f["datasets"].items())
|
||||||
rd[k] = True, group[k].value
|
|
||||||
self.datasets.init(rd)
|
self.datasets.init(rd)
|
||||||
|
|
||||||
def double_clicked(self, current):
|
def double_clicked(self, current):
|
||||||
|
@ -138,6 +134,8 @@ class FilesDock(QtWidgets.QDockWidget):
|
||||||
return
|
return
|
||||||
logger.info("loading experiment for %s", info.filePath())
|
logger.info("loading experiment for %s", info.filePath())
|
||||||
with f:
|
with f:
|
||||||
|
if "expid" not in f:
|
||||||
|
return
|
||||||
expid = pyon.decode(f["expid"].value)
|
expid = pyon.decode(f["expid"].value)
|
||||||
|
|
||||||
def select_dir(self, path):
|
def select_dir(self, path):
|
||||||
|
|
Loading…
Reference in New Issue