Fix disk size

This commit is contained in:
Mathis Ribet 2024-10-12 15:48:40 +02:00 committed by Mathis Ribet
parent 8dde35dd31
commit 56627c1aa9
No known key found for this signature in database
GPG key ID: AC210F5420AF42C0

View file

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