diff options
| -rw-r--r-- | lirc/client.py | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/lirc/client.py b/lirc/client.py index 28adba1..7df832c 100644 --- a/lirc/client.py +++ b/lirc/client.py @@ -110,17 +110,13 @@ class Client: Raises: LircdCommandFailure: If the command fails. """ - if remote != "": - remote_to_stop = remote - elif self.__last_send_start_remote: - remote_to_stop = self.__last_send_start_remote + if self.__last_send_start_remote: + remote = self.__last_send_start_remote - if key != "": - key_to_stop = key - elif self.__last_send_start_key: - key_to_stop = self.__last_send_start_key + if self.__last_send_start_key: + key = self.__last_send_start_key - self.__send_command(f"SEND_STOP {remote_to_stop} {key_to_stop}") + self.__send_command(f"SEND_STOP {remote} {key}") def list_remotes(self) -> List[str]: """ |