Fix disk size inventory #310

Merged
ribetm merged 1 commit from ribetm/disk_size into main 2024-10-21 13:35:30 +02:00

View file

@ -341,7 +341,7 @@ class Inventory():
for disk in self.lshw.get_hw_linux("storage"):
if self.is_virtual_disk(disk, raid_devices):
continue
size = int(getattr(disk, "size", 0)) / 1073741824
size = round(int(disk.get("size", 0)) / 1073741824, 1)
d = {
"name": "",
'Size': '{} GB'.format(size),