From f457b59985c2a0d5036b0c1ec6261eeb0ee33524 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Fri, 18 May 2018 23:30:52 +0800 Subject: [PATCH] kasli_tester: bail out when run from ARTIQ master --- artiq/examples/kasli_basic/repository/kasli_tester.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/artiq/examples/kasli_basic/repository/kasli_tester.py b/artiq/examples/kasli_basic/repository/kasli_tester.py index c24d83e7e..4cad877f8 100644 --- a/artiq/examples/kasli_basic/repository/kasli_tester.py +++ b/artiq/examples/kasli_basic/repository/kasli_tester.py @@ -25,6 +25,11 @@ def is_enter_pressed() -> TBool: class KasliTester(EnvExperiment): 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.leds = dict()