Skip to content

Commit

Permalink
original_code is gone
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrudd2 committed Jan 22, 2025
1 parent 620fd0c commit 6884496
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pymodbus_repl/client/mclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ class ExtendedRequestSupport(_Base): # pylint: disable=too-many-public-methods
"""Extended request support."""

@staticmethod
def _process_exception(resp, **kwargs):
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
return {
"original_function_code": f"{resp.original_code} ({hex(resp.original_code)})",
"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),
Expand Down

0 comments on commit 6884496

Please sign in to comment.