From ad4a1fcd38a22c364f8d29a515a986d9306d7259 Mon Sep 17 00:00:00 2001 From: Sven Sager Date: Fri, 1 Dec 2023 15:48:57 +0100 Subject: [PATCH] fix: Error of loop management in the context manager When leaving the IO context manager, the loop flag was not reset properly. The context manager could therefore only be traversed once. Signed-off-by: Sven Sager --- src/revpimodio2/io.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/revpimodio2/io.py b/src/revpimodio2/io.py index 847339b..10ae93e 100644 --- a/src/revpimodio2/io.py +++ b/src/revpimodio2/io.py @@ -121,7 +121,7 @@ class IOList(object): # Wait until imgwriter has written outputs self.__modio._imgwriter.newdata.wait(2.5) - if self.__modio._context_manager: + if not self.__modio._context_manager: # Do not reset if ModIO is in a context manager itself, it will handle that flag self.__modio._looprunning = False