From 7ba6422964386525957e767bab0c8833f087c6d4 Mon Sep 17 00:00:00 2001 From: Max Date: Thu, 20 Jun 2024 19:03:38 +0200 Subject: [PATCH] undo previous fix and add check for no expected response --- pyLSV2/client.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pyLSV2/client.py b/pyLSV2/client.py index 3763d2a..6babd6d 100644 --- a/pyLSV2/client.py +++ b/pyLSV2/client.py @@ -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") @@ -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,