Skip to content

Commit 8b1a011

Browse files
committed
Correction of USB device detection logic
1 parent 99f14e2 commit 8b1a011

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

library/lcd/lcd_comm_turing_usb.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,8 +462,11 @@ def encrypt_command_packet(data: bytearray) -> bytearray:
462462

463463

464464
def find_usb_device():
465+
dev = None
465466
for pid in PRODUCT_ID:
466467
dev = usb.core.find(idVendor=VENDOR_ID, idProduct=pid)
468+
if dev is not None:
469+
break
467470
if dev is None:
468471
raise ValueError(f'USB device not found')
469472

0 commit comments

Comments
 (0)