From 12a8c76df9a43b25a193fb8357e6e3dea482c500 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 16 Apr 2016 14:21:01 +0800 Subject: [PATCH] environment,worker: remove enable_processors --- artiq/language/environment.py | 8 ++------ artiq/master/worker_impl.py | 6 ++---- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/artiq/language/environment.py b/artiq/language/environment.py index 35654aab4..c61a1fa79 100644 --- a/artiq/language/environment.py +++ b/artiq/language/environment.py @@ -149,14 +149,13 @@ class HasEnvironment: """Provides methods to manage the environment of an experiment (devices, parameters, results, arguments).""" def __init__(self, device_mgr=None, dataset_mgr=None, *, parent=None, - default_arg_none=False, enable_processors=False, **kwargs): + default_arg_none=False, **kwargs): self.requested_args = OrderedDict() self.__device_mgr = device_mgr self.__dataset_mgr = dataset_mgr self.__parent = parent self.__default_arg_none = default_arg_none - self.__enable_processors = enable_processors self.__kwargs = kwargs self.__in_build = True @@ -215,10 +214,7 @@ class HasEnvironment: return None else: raise - if self.__enable_processors: - return processor.process(argval) - else: - return argval + return processor.process(argval) def setattr_argument(self, key, processor=None, group=None): """Sets an argument as attribute. The names of the argument and of the diff --git a/artiq/master/worker_impl.py b/artiq/master/worker_impl.py index 79f71eba2..ec91181e3 100644 --- a/artiq/master/worker_impl.py +++ b/artiq/master/worker_impl.py @@ -139,8 +139,7 @@ def examine(device_mgr, dataset_mgr, file): if name[-1] == ".": name = name[:-1] exp_inst = exp_class(device_mgr, dataset_mgr, - default_arg_none=True, - enable_processors=True) + default_arg_none=True) arginfo = OrderedDict( (k, (proc.describe(), group)) for k, (proc, group) in exp_inst.requested_args.items()) @@ -215,8 +214,7 @@ def main(): os.makedirs(dirname, exist_ok=True) os.chdir(dirname) exp_inst = exp( - device_mgr, dataset_mgr, enable_processors=True, - **expid["arguments"]) + device_mgr, dataset_mgr, **expid["arguments"]) put_object({"action": "completed"}) elif action == "prepare": exp_inst.prepare()