[FIX] Don't add disk with 0 capacity

This commit is contained in:
vadzik 2024-04-14 16:16:29 +03:00
parent f56f450fdf
commit 21324b62f1

View File

@ -96,7 +96,7 @@ class App:
disks = di.get_disk_list(sorting=True)
self.drives = []
for disk in disks:
if "zram" not in disk.get_path():
if "zram" not in disk.get_path() and disk.get_size() != 0:
self.drives.append(Drive(disk.get_model(), disk.get_path(), disk.get_type_str(
), disk.get_logical_block_size(), int(disk.get_size()*512), disk.get_serial_number(), disk.get_device_id()))