From a93104bafbd1ea1f90a3a90b4b8926b13f3bd111 Mon Sep 17 00:00:00 2001 From: votti Date: Sat, 7 Jan 2023 21:20:36 +0100 Subject: [PATCH] Give more meaningfull name to listener thread variable --- .../components/controls/bluetooth_audio_buttons/__init__.py | 4 ++-- src/jukebox/components/controls/event_devices/__init__.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/jukebox/components/controls/bluetooth_audio_buttons/__init__.py b/src/jukebox/components/controls/bluetooth_audio_buttons/__init__.py index 999a4f218..eda596fcf 100644 --- a/src/jukebox/components/controls/bluetooth_audio_buttons/__init__.py +++ b/src/jukebox/components/controls/bluetooth_audio_buttons/__init__.py @@ -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 diff --git a/src/jukebox/components/controls/event_devices/__init__.py b/src/jukebox/components/controls/event_devices/__init__.py index 9801b2273..09768d103 100644 --- a/src/jukebox/components/controls/event_devices/__init__.py +++ b/src/jukebox/components/controls/event_devices/__init__.py @@ -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,