From 9138c433b6517693671f64e0552803e160b255d7 Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 28 Nov 2023 20:15:59 +0100 Subject: [PATCH] add workaround for #52 this will suppress the false positiv while reviving a negativ response on querying for more error messages --- pyLSV2/client.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyLSV2/client.py b/pyLSV2/client.py index 9960c49..94452df 100644 --- a/pyLSV2/client.py +++ b/pyLSV2/client.py @@ -179,6 +179,10 @@ def _send_recive( raise LSV2ProtocolException("unknown response received") if self._llcom.last_response is lc.RSP.T_ER: + if self.last_error.e_code is lc.LSV2StatusCode.T_ER_NO_NEXT_ERROR: + # workaround since querying for error messages will also return an error state + return True + self._logger.info( "an error was received after the last transmission, %s '%s'", self.last_error,