Skip to content

Commit

Permalink
Give more meaningfull name to listener thread variable
Browse files Browse the repository at this point in the history
  • Loading branch information
votti committed Jan 7, 2023
1 parent 6cffffe commit b17d531
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ def activate(device_name: str, exact: bool = True, open_initial_delay: float = 0
# Do a bit of housekeeping: Delete dead threads
listener = list(filter(lambda x: x.is_alive(), listener))
# Check that there is no running thread for this device already
for ll in listener:
if ll.device_request == device_name and ll.is_alive():
for thread in listener:
if thread.device_request == device_name and thread.is_alive():
logger.debug(f"Button listener thread already active for '{device_name}'")
return

Expand Down
4 changes: 2 additions & 2 deletions src/jukebox/components/controls/event_devices/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ def activate(
# Do a bit of housekeeping: Delete dead threads
listener = list(filter(lambda x: x.is_alive(), listener))
# Check that there is no running thread for this device already
for ll in listener:
if ll.device_request == device_name and ll.is_alive():
for thread in listener:
if thread.device_request == device_name and thread.is_alive():
logger.debug(
"Event device listener thread already active for '%s'",
device_name,
Expand Down

0 comments on commit b17d531

Please sign in to comment.