From 780d6d152cede33ab2be829cff2adcfbeb5dd718 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 7 Jan 2017 16:20:17 +0100 Subject: [PATCH] worker: fix handling of archive parameter during dataset get in examine --- artiq/master/worker_impl.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/artiq/master/worker_impl.py b/artiq/master/worker_impl.py index 854d1a31f..a638a1048 100644 --- a/artiq/master/worker_impl.py +++ b/artiq/master/worker_impl.py @@ -136,10 +136,21 @@ register_experiment = make_parent_action("register_experiment") class ExamineDeviceMgr: get_device_db = make_parent_action("get_device_db") + @staticmethod def get(name): return DummyDevice() +class ExamineDatasetMgr: + @staticmethod + def get(key, archive=False): + return ParentDatasetDB.get(key) + + @staticmethod + def update(self, mod): + pass + + def examine(device_mgr, dataset_mgr, file): module = file_import(file) for class_name, exp_class in module.__dict__.items(): @@ -252,7 +263,7 @@ def main(): f["expid"] = pyon.encode(expid) put_object({"action": "completed"}) elif action == "examine": - examine(ExamineDeviceMgr, ParentDatasetDB, obj["file"]) + examine(ExamineDeviceMgr, ExamineDatasetMgr, obj["file"]) put_object({"action": "completed"}) elif action == "terminate": break