From 4a9c7c9ba3ffdaecabd4a3d58f3fb6e802130d06 Mon Sep 17 00:00:00 2001 From: matt Date: Sat, 17 Oct 2026 23:20:40 -0700 Subject: [PATCH] fix len assertation in reset_adapter --- api/ble.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/ble.py b/api/ble.py index c8b3ad8..05435ec 100644 --- a/api/ble.py +++ b/api/ble.py @@ -235,7 +235,7 @@ def read_data_sync(mac: str) -> Optional[SensorReading]: # --------------------------------------------------------------------------- # def reset_adapter(): log.info("Restting BT Adapter...") - if current_usb_id.len() > 0: + if len(current_usb_id) > 0: log.warning(f"Doing big reset - USB ID {current_usb_id}") log.info(subprocess.run(["usbreset", current_usb_id], capture_output=True, text=True, check=True).stdout.strip()) time.sleep(2)