From 20a710b2e0efcc4560a7eae8a4e595647aa36d3b Mon Sep 17 00:00:00 2001 From: Alex Ruddick Date: Tue, 21 Jan 2025 20:29:23 -0600 Subject: [PATCH] ModbusExceptions enum is gone --- pymodbus_repl/client/mclient.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pymodbus_repl/client/mclient.py b/pymodbus_repl/client/mclient.py index d7913bd..af21efc 100644 --- a/pymodbus_repl/client/mclient.py +++ b/pymodbus_repl/client/mclient.py @@ -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 {