diff --git a/resources/device_probe.py b/resources/device_probe.py index 7657e2553..5506289af 100644 --- a/resources/device_probe.py +++ b/resources/device_probe.py @@ -52,10 +52,11 @@ class PCIDevice: if type(ioname) is bytes: ioname = ioname.strip(b"\0").decode() - vendor_id_unspoofed, device_id_unspoofed = (int(i, 16) for i in ioname[3:].split(",")) - if anti_spoof: - vendor_id = vendor_id_unspoofed - device_id = device_id_unspoofed + if ioname.startswith("pci"): + vendor_id_unspoofed, device_id_unspoofed = (int(i, 16) for i in ioname[3:].split(",")) + if anti_spoof: + vendor_id = vendor_id_unspoofed + device_id = device_id_unspoofed if vendor_id is None and device_id is None: vendor_id, device_id = [int.from_bytes(properties[i][:4], byteorder="little") for i in ["vendor-id", "device-id"]]