mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Make get_dfu_devices compatible with pyusb 1.0.0b2
This commit is contained in:
parent
47806afe4a
commit
46bbb691ca
@ -360,9 +360,13 @@ def get_dfu_devices(*args, **kwargs):
|
|||||||
Additional filters (like idProduct and idVendor) can be passed in to
|
Additional filters (like idProduct and idVendor) can be passed in to
|
||||||
refine the search.
|
refine the search.
|
||||||
"""
|
"""
|
||||||
|
l = []
|
||||||
return usb.core.find(*args, find_all=True,
|
devices = usb.core.find(*args, find_all=True,
|
||||||
custom_match=FilterDFU(), **kwargs)
|
custom_match=FilterDFU(), **kwargs)
|
||||||
|
# convert to list for compatibility with newer pyusb
|
||||||
|
for d in devices:
|
||||||
|
l.append(d)
|
||||||
|
return l
|
||||||
|
|
||||||
|
|
||||||
def get_memory_layout(device):
|
def get_memory_layout(device):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user