diff --git a/api/ble.py b/api/ble.py index cc6a867..d54ed2f 100644 --- a/api/ble.py +++ b/api/ble.py @@ -222,8 +222,8 @@ def read_data_sync(mac: str) -> Optional[SensorReading]: # --------------------------------------------------------------------------- # def reset_adapter(): log.info("Restting BT Adapter...") - log.info(subprocess.run(["sudo", "rfkill", "block", "bluetooth"], check=True)) - log.info(subprocess.run(["sudo", "rfkill", "unblock", "bluetooth"], check=True)) + log.info(subprocess.run(["sudo", "rfkill", "block", "bluetooth"], capture_output=True, text=True, check=True).stdout) + log.info(subprocess.run(["sudo", "rfkill", "unblock", "bluetooth"], capture_output=True, text=True, check=True).stdout) time.sleep(5) log.info("Reset complete. ")