Skip to content

Commit

Permalink
undo previous fix and add check for no expected response
Browse files Browse the repository at this point in the history
  • Loading branch information
drunsinn committed Jun 20, 2024
1 parent fcb4b1b commit 7ba6422
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pyLSV2/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ def _send_recive(
self._logger.debug("unknown or unsupported system command %s", bytes_to_send)
return False

lsv_content = self._llcom.telegram(command, bytes_to_send)
wait_for_response = bool(expected_response is not lc.RSP.NONE)
lsv_content = self._llcom.telegram(command, bytes_to_send, wait_for_response)

if self._llcom.last_response is lc.RSP.UNKNOWN:
self._logger.error("unknown response received")
Expand Down Expand Up @@ -1070,7 +1071,7 @@ def send_file(
)
return False
else:
if not self._send_recive(lc.RSP.T_FD, None, lc.RSP.T_ER):
if not self._send_recive(lc.RSP.T_FD, None, lc.RSP.NONE):
self._logger.warning(
"could not send end of transmission telegram, got response '%s'",
self._llcom.last_response,
Expand Down

0 comments on commit 7ba6422

Please sign in to comment.