diff --git a/pyLSV2/client.py b/pyLSV2/client.py index 5d0509d..6e16875 100644 --- a/pyLSV2/client.py +++ b/pyLSV2/client.py @@ -1678,7 +1678,7 @@ def get_error_messages(self) -> List[ld.NCErrorMessage]: messages.append(lm.decode_error_message(result)) result = self._send_recive(lc.CMD.R_RI, payload, lc.RSP.S_RI) - if self.last_error is lc.LSV2StatusCode.T_ER_NO_NEXT_ERROR: + if self.last_error.e_code is lc.LSV2StatusCode.T_ER_NO_NEXT_ERROR: self._logger.debug("successfully read all errors") else: self._logger.warning( @@ -1687,7 +1687,7 @@ def get_error_messages(self) -> List[ld.NCErrorMessage]: return messages - if self.last_error is lc.LSV2StatusCode.T_ER_NO_NEXT_ERROR: + if self.last_error.e_code is lc.LSV2StatusCode.T_ER_NO_NEXT_ERROR: self._logger.debug( "successfully read first error but no error active") return messages