Skip to content

Commit adbfb32

Browse files
committed
threads should aways be named (for debugability)
1 parent 6df89f5 commit adbfb32

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

meshtastic/ble_interface.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919

2020

2121
class BLEInterface(MeshInterface):
22-
"""MeshInterface using BLE to connect to devices"""
22+
"""MeshInterface using BLE to connect to devices."""
2323

2424
class BLEError(Exception):
25-
"""An exception class for BLE errors"""
25+
"""An exception class for BLE errors."""
2626

2727
def __init__(self, message):
2828
self.message = message
@@ -54,7 +54,7 @@ def __init__(
5454
logging.debug("Threads running")
5555

5656
try:
57-
logging.debug(f"BLE connecting to: {address}")
57+
logging.debug(f"BLE connecting to: {address if address else 'any'}")
5858
self.client = self.connect(address)
5959
self.state.BLE = True
6060
logging.debug("BLE connected")
@@ -178,7 +178,7 @@ class BLEClient:
178178
"""Client for managing connection to a BLE device"""
179179

180180
def __init__(self, address=None, **kwargs):
181-
self._eventThread = Thread(target=self._run_event_loop)
181+
self._eventThread = Thread(target=self._run_event_loop, name="BLEClient")
182182
self._eventThread_started = Event()
183183
self._eventThread_stopped = Event()
184184
self._eventThread.start()

0 commit comments

Comments
 (0)