ble - add handler for bleakdbuserror exception

This commit is contained in:
matt committed 2026-10-20 04:08:19 -07:00
1 parent a07c831388
commit afba5bcf62
1 file changed
+4 -1
+4 -1
View File
@@ -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: