fixed wait_addr to exit immediately on exception
authorTobias Platen <tplaten@posteo.de>
Sat, 4 Dec 2021 15:19:52 +0000 (16:19 +0100)
committerTobias Platen <tplaten@posteo.de>
Sat, 4 Dec 2021 15:19:52 +0000 (16:19 +0100)
src/soc/config/test/test_pi2ls.py

index 31b92363c2ca3ce897f376f8bdc6c57383bf29fc..4949bd053eabc9c9b6808190740951fdf92aa2c2 100644 (file)
@@ -24,8 +24,9 @@ def wait_addr(port,debug=None):
     cnt = 0
     while True:
         addr_ok = yield port.addr_ok_o
-        print("addrok", addr_ok,cnt,debug)
-        if addr_ok:
+        exc_happened = yield port.exc_o.happened
+        print("addrok", addr_ok,cnt,debug,exc_happened)
+        if addr_ok or exc_happened:
             break
         yield
         cnt += 1