forked from M-Labs/artiq
1
0
Fork 0

kasli_tester: bail out when run from ARTIQ master

This commit is contained in:
Sebastien Bourdeauducq 2018-05-18 23:30:52 +08:00
parent 3cbcb3bff6
commit f457b59985
1 changed files with 5 additions and 0 deletions

View File

@ -25,6 +25,11 @@ def is_enter_pressed() -> TBool:
class KasliTester(EnvExperiment): class KasliTester(EnvExperiment):
def build(self): def build(self):
# hack to detect artiq_run
if self.get_device("scheduler").__class__.__name__ != "DummyScheduler":
raise NotImplementedError(
"must be run with artiq_run to support keyboard interaction")
self.setattr_device("core") self.setattr_device("core")
self.leds = dict() self.leds = dict()