tester: handle no available ttl outputs

This commit is contained in:
Robert Jördens 2018-09-24 09:19:28 +00:00
parent 69d060b639
commit 20cddb6a25
1 changed files with 3 additions and 1 deletions

View File

@ -156,7 +156,9 @@ class KasliTester(EnvExperiment):
def test_ttl_ins(self): def test_ttl_ins(self):
print("*** Testing TTL inputs.") print("*** Testing TTL inputs.")
if not self.ttl_outs:
print("No TTL output channel available to use as stimulus.")
return
ttl_out_name, ttl_out_dev = next(iter(self.ttl_outs)) ttl_out_name, ttl_out_dev = next(iter(self.ttl_outs))
for ttl_in_name, ttl_in_dev in self.ttl_ins: for ttl_in_name, ttl_in_dev in self.ttl_ins:
print("Connect {} to {}. Press ENTER when done." print("Connect {} to {}. Press ENTER when done."