close device inside for loop

This commit is contained in:
Gilles Boccon-Gibod
2022-06-03 19:53:26 -07:00
parent 302c495178
commit 01492d510c

View File

@@ -281,7 +281,7 @@ async def open_usb_transport(spec):
):
found = device
break
device.close()
device.close()
else:
found = context.getByVendorIDAndProductID(int(vendor_id, 16), int(product_id, 16), skip_on_error=True)
else: