forked from M-Labs/artiq
worker: also return DummyDevice from ExamineDeviceMgr
This commit is contained in:
parent
7a2405146a
commit
cfb9fb808c
@ -213,8 +213,12 @@ class HasEnvironment:
|
||||
Other initialization steps such as requesting devices may also be
|
||||
performed here.
|
||||
|
||||
When the repository is scanned, any requested devices and arguments
|
||||
are set to ``None``.
|
||||
There are two situations where the requested devices are replaced by
|
||||
``DummyDevice()`` and arguments are set to their defaults (or ``None``)
|
||||
instead: when the repository is scanned to build the list of
|
||||
available experiments and when the dataset browser ``artiq_browser``
|
||||
is used to open or run the analysis stage of an experiment. Do not
|
||||
rely on being able to operate on devices or arguments in ``build()``.
|
||||
|
||||
Datasets are read-only in this method.
|
||||
|
||||
|
@ -11,7 +11,7 @@ import artiq
|
||||
from artiq.protocols import pipe_ipc, pyon
|
||||
from artiq.protocols.packed_exceptions import raise_packed_exc
|
||||
from artiq.tools import multiline_log_config, file_import
|
||||
from artiq.master.worker_db import DeviceManager, DatasetManager
|
||||
from artiq.master.worker_db import DeviceManager, DatasetManager, DummyDevice
|
||||
from artiq.language.environment import (is_experiment, TraceArgumentManager,
|
||||
ProcessArgumentManager)
|
||||
from artiq.language.core import set_watchdog_factory, TerminationRequested
|
||||
@ -124,7 +124,7 @@ class ExamineDeviceMgr:
|
||||
get_device_db = make_parent_action("get_device_db")
|
||||
|
||||
def get(name):
|
||||
return None
|
||||
return DummyDevice()
|
||||
|
||||
|
||||
def examine(device_mgr, dataset_mgr, file):
|
||||
|
Loading…
Reference in New Issue
Block a user