forked from M-Labs/artiq
browser: examine can fail
This commit is contained in:
parent
904db4923c
commit
02b54930a9
|
@ -353,7 +353,12 @@ class ExperimentsArea(QtWidgets.QMdiArea):
|
||||||
return
|
return
|
||||||
self.current_dir = os.path.dirname(file)
|
self.current_dir = os.path.dirname(file)
|
||||||
logger.info("opening experiment %s", file)
|
logger.info("opening experiment %s", file)
|
||||||
|
try:
|
||||||
description = await self.examine(file)
|
description = await self.examine(file)
|
||||||
|
except:
|
||||||
|
logger.error("Could not examine experiment '%s'",
|
||||||
|
file, exc_info=True)
|
||||||
|
return
|
||||||
for class_name, class_desc in description.items():
|
for class_name, class_desc in description.items():
|
||||||
expurl = "{}@{}".format(class_name, file)
|
expurl = "{}@{}".format(class_name, file)
|
||||||
arguments = self.initialize_submission_arguments(
|
arguments = self.initialize_submission_arguments(
|
||||||
|
@ -380,7 +385,12 @@ class ExperimentsArea(QtWidgets.QMdiArea):
|
||||||
|
|
||||||
async def compute_arginfo(self, expurl):
|
async def compute_arginfo(self, expurl):
|
||||||
class_name, file = expurl.split("@", maxsplit=1)
|
class_name, file = expurl.split("@", maxsplit=1)
|
||||||
|
try:
|
||||||
desc = await self.examine(file)
|
desc = await self.examine(file)
|
||||||
|
except:
|
||||||
|
logger.error("Could not examine experiment '%s'",
|
||||||
|
file, exc_info=True)
|
||||||
|
return
|
||||||
return desc[class_name]["arginfo"]
|
return desc[class_name]["arginfo"]
|
||||||
|
|
||||||
def open_experiment(self, expurl, arguments):
|
def open_experiment(self, expurl, arguments):
|
||||||
|
|
Loading…
Reference in New Issue