Skip to content

Commit 6884496

Browse files
committed
original_code is gone
1 parent 620fd0c commit 6884496

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pymodbus_repl/client/mclient.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,13 @@ class ExtendedRequestSupport(_Base): # pylint: disable=too-many-public-methods
8585
"""Extended request support."""
8686

8787
@staticmethod
88-
def _process_exception(resp, **kwargs):
88+
def _process_exception(resp, **kwargs) -> dict:
8989
"""Set internal process exception."""
9090
if "slave" not in kwargs:
9191
return {"message": "Broadcast message, ignoring errors!!!"}
9292
if isinstance(resp, ExceptionResponse): # pylint: disable=else-if-used
9393
return {
94-
"original_function_code": f"{resp.original_code} ({hex(resp.original_code)})",
94+
"original_function_code": f"{resp.function_code - 0x80} ({hex(resp.function_code - 0x80)})",
9595
"error_function_code": f"{resp.function_code} ({hex(resp.function_code)})",
9696
"exception code": resp.exception_code,
9797
"message": ExceptionResponse.decode(resp.exception_code),

0 commit comments

Comments
 (0)