From afba5bcf6268d377bf3e64950c4ec3c88d5261e7 Mon Sep 17 00:00:00 2001 From: matt Date: Tue, 20 Oct 2026 04:08:19 -0700 Subject: [PATCH] ble - add handler for bleakdbuserror exception --- api/ble.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/api/ble.py b/api/ble.py index c797867..4ce96bd 100644 --- a/api/ble.py +++ b/api/ble.py @@ -137,7 +137,10 @@ def sensor_data_query(mac_list: List[str]) -> List[dict]: except Exception as e: log.error(f"Error reading BLE data - {e}") this_result = None - if "org.freedesktop.DBus.Error.AccessDenied" in e: + if "org.freedesktop.DBus.Error.AccessDenied" in str(e): + reset_adapter() + return result + if "argument of type 'BleakDBusError' is not iterable" in str(e): reset_adapter() return result if this_result: