summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Triguba <eugenetriguba@gmail.com>2020-10-04 10:10:35 -0500
committerEugene Triguba <eugenetriguba@gmail.com>2020-10-04 10:10:35 -0500
commitfafb2a2ab5ee14029777af933047ea0fc87a3c27 (patch)
tree6f43c8194ca519fdebb0d195a6dd985f96911476
parentMinor docstring tweaks and stop_repeat default parameters (diff)
downloadlirc-fafb2a2ab5ee14029777af933047ea0fc87a3c27.zip
Fix stop_repeat() reference to nonexistent variable
-rw-r--r--lirc/client.py14
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]:
"""