Skip to content

Commit

Permalink
ModbusExceptions enum is gone
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrudd2 committed Jan 22, 2025
1 parent 81acb3b commit 20a710b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pymodbus_repl/client/mclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,11 @@ def _process_exception(resp, **kwargs) -> dict:
"""Set internal process exception."""
if "slave" not in kwargs:
return {"message": "Broadcast message, ignoring errors!!!"}
if isinstance(resp, ExceptionResponse): # pylint: disable=else-if-used
if isinstance(resp, ExceptionResponse):
return {
"original_function_code": f"{resp.function_code - 0x80} ({hex(resp.function_code - 0x80)})",
"error_function_code": f"{resp.function_code} ({hex(resp.function_code)})",
"exception code": resp.exception_code,
"message": ExceptionResponse.decode(resp.exception_code),
}
if isinstance(resp, ModbusIOException):
return {
Expand Down

0 comments on commit 20a710b

Please sign in to comment.