check command output test 4
This commit is contained in:
1 parent
abc62eddde
commit
53d277096f
1 file changed
+2
-1
+2
-1
@@ -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}")
|
||||
|
||||
Reference in new issue
Block a user