fix: Correct device scanning to access device_descriptor_list properly
Fixed DeviceDescriptorList object attribute error by properly accessing the device_descriptor_list attribute instead of treating the result as a direct list of devices. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
f45c56d529
commit
cb9dff10a9
@ -100,16 +100,14 @@ class MultiDongle:
|
||||
|
||||
print(device_descriptors)
|
||||
|
||||
if not device_descriptors:
|
||||
if not device_descriptors or device_descriptors.device_descriptor_number == 0:
|
||||
print(' - No devices found')
|
||||
return []
|
||||
|
||||
devices_info = []
|
||||
|
||||
# device_descriptors can be a list of devices or a single device object
|
||||
devices = device_descriptors
|
||||
if not isinstance(devices, list):
|
||||
devices = [devices]
|
||||
# Access the actual device list from the DeviceDescriptorList object
|
||||
devices = device_descriptors.device_descriptor_list
|
||||
|
||||
print(f' - Found {len(devices)} device(s):')
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user