Show filesystem type in select_disk_parts()

This commit is contained in:
2Shirt 2023-06-24 18:58:06 -07:00
parent d94e9097b7
commit 21cbe5d445
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C

View file

@ -194,10 +194,13 @@ def select_disk_parts(prompt_msg, disk) -> list[Disk]:
# Add parts
whole_disk_str = f'{str(disk.path):<14} (Whole device)'
for part in disk.children:
fstype = part.get('fstype', '')
fstype = str(fstype) if fstype else ''
size = part["size"]
name = (
f'{str(part["path"]):<14} '
f'({bytes_to_string(size, decimals=1, use_binary=False):>6})'
f'{fstype.upper():<5} '
f'({bytes_to_string(size, decimals=1, use_binary=True):>6})'
)
menu.add_option(name, details={'Selected': True, 'pathlib.Path': part['path']})