diff --git a/netbox_agent/lshw.py b/netbox_agent/lshw.py index 0a5a870..8070633 100644 --- a/netbox_agent/lshw.py +++ b/netbox_agent/lshw.py @@ -104,7 +104,10 @@ class LSHW(): d['product'] = device["ModelNumber"] d['serial'] = device["SerialNumber"] d["version"] = device["Firmware"] - d['size'] = device["UsedSize"] + if "UsedSize" in device: + d['size'] = device["UsedSize"] + if "UsedBytes" in device: + d['size'] = device["UsedBytes"] d['description'] = "NVME Disk" self.disks.append(d)