Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions pymodbus/repl/client/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def _print_command_help(self, commands):
)
)

def _process_client(self, text, client):
def _process_client(self, text, client) -> Result:
"""Process client commands."""
text = text.strip().split()
cmd = text[0].split(".")[1]
Expand All @@ -209,6 +209,7 @@ def _process_client(self, text, client):
else:
result = Result(getattr(client, cmd)(**kwargs))
result.print_result()
return result

def _process_result(self, text, result):
"""Process result commands."""
Expand All @@ -233,7 +234,7 @@ def run(self):
elif text.strip().lower() == "exit":
raise EOFError()
elif text.strip().lower().startswith("client."):
self._process_client(text, self.client)
result = self._process_client(text, self.client)
elif text.strip().lower().startswith("result.") and result:
self._process_result(text, result)
except KeyboardInterrupt:
Expand Down