diff --git a/api/ble.py b/api/ble.py index 34a5c9a..3ef8055 100644 --- a/api/ble.py +++ b/api/ble.py @@ -209,7 +209,7 @@ def sensor_data_query(mac_list: List[str]) -> List[dict]: except Exception as e: print(f"Error reading BLE data - {e}") this_result = None - if "org.freedesktop.DBus.Error.AccessDenied" in e: + if "org.freedesktop.DBus.Error.AccessDenied" in e and e: return result if this_result: result.append(