LSHW nvme bugfix #138

Merged
cyrinux merged 1 commit from fix_nvme into master 2020-06-23 21:01:32 +02:00

View file

@ -91,18 +91,16 @@ class LSHW():
encoding='utf8') encoding='utf8')
) )
d = {} for device in nvme["Devices"]:
d["vendor"] = obj["vendor"] d = {}
d["version"] = obj["version"] d['logicalname'] = device["DevicePath"]
d["product"] = obj["product"] d['product'] = device["ModelNumber"]
d['serial'] = device["SerialNumber"]
d["version"] = device["Firmware"]
d['size'] = device["UsedSize"]
d['description'] = "NVME Disk"
d['description'] = "NVME Disk" self.disks.append(d)
d['product'] = nvme["Devices"][0]["ModelNumber"]
d['size'] = nvme["Devices"][0]["PhysicalSize"]
d['serial'] = nvme["Devices"][0]["SerialNumber"]
d['logicalname'] = nvme["Devices"][0]["DevicePath"]
self.disks.append(d)
def find_cpus(self, obj): def find_cpus(self, obj):
if "product" in obj: if "product" in obj: