diff --git a/Scripts/platforms/windows.py b/Scripts/platforms/windows.py index 5ab0feb..3b59fa0 100755 --- a/Scripts/platforms/windows.py +++ b/Scripts/platforms/windows.py @@ -96,11 +96,12 @@ class WindowsHardwareInfo: if pnp_device_id: device_info = self.parse_device_path(pnp_device_id) - - if device_class in "Unknown": - device_class = self.unknown_class_device(device_info.get("Device ID")) - elif device_class in "System" and chipset_data.chipset_controllers.get(device_info.get("Device ID")): - self.chipset_model = chipset_data.chipset_controllers.get(device_info.get("Device ID")) + + if device_info.get("Device ID"): + if device_class in "Unknown": + device_class = self.unknown_class_device(device_info.get("Device ID")) + elif device_class in "System" and chipset_data.chipset_controllers.get(device_info.get("Device ID")): + self.chipset_model = chipset_data.chipset_controllers.get(device_info.get("Device ID")) if device_class in self.devices_by_class: self.devices_by_class[device_class].append(device)