From cb9dff10a9958cc17ec57abd0be53434368b4cdc Mon Sep 17 00:00:00 2001 From: Masonmason Date: Thu, 24 Jul 2025 10:13:17 +0800 Subject: [PATCH] fix: Correct device scanning to access device_descriptor_list properly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- cluster4npu_ui/core/functions/Multidongle.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cluster4npu_ui/core/functions/Multidongle.py b/cluster4npu_ui/core/functions/Multidongle.py index 73fff46..4662fa5 100644 --- a/cluster4npu_ui/core/functions/Multidongle.py +++ b/cluster4npu_ui/core/functions/Multidongle.py @@ -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):')