Skip to content

Commit

Permalink
fix broken error code checking
Browse files Browse the repository at this point in the history
fix reported error from #52
  • Loading branch information
drunsinn committed Sep 30, 2023
1 parent cfa4f46 commit 79aa0a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyLSV2/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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
Expand Down

0 comments on commit 79aa0a4

Please sign in to comment.