diff options
| author | Eugene Triguba <eugenetriguba@gmail.com> | 2020-10-04 10:10:35 -0500 |
|---|---|---|
| committer | Eugene Triguba <eugenetriguba@gmail.com> | 2020-10-04 10:10:35 -0500 |
| commit | fafb2a2ab5ee14029777af933047ea0fc87a3c27 (patch) | |
| tree | 6f43c8194ca519fdebb0d195a6dd985f96911476 | |
| parent | Minor docstring tweaks and stop_repeat default parameters (diff) | |
| download | lirc-fafb2a2ab5ee14029777af933047ea0fc87a3c27.zip | |
Fix stop_repeat() reference to nonexistent variable
| -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]: """ |