diff --git a/api/ble.py b/api/ble.py index 46d6b53..041a7c5 100644 --- a/api/ble.py +++ b/api/ble.py @@ -341,13 +341,14 @@ if __name__ == "__main__": # calculate the BT ID and pass to test present_usb_ids_command = "lsusb | awk '{print $6}'" + # Capture each USB ID as a separate line present_usb_id_output = subprocess.run( present_usb_ids_command, shell=True, capture_output=True, text=True, check=True, - ).stdout + ).stdout.splitlines() current_usb_id = '' for usb_id in present_usb_id_output: log.info(f"usb_id - {usb_id} | bt_usb_ids - {bt_usb_ids}")