Adding exfat as valid drive format.

This commit is contained in:
Roland 2024-03-10 16:43:33 -06:00
parent 346e06cc2b
commit 2ce62b7fc4
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93

View file

@ -252,7 +252,7 @@ DRIVE_REGEX = re.compile(r'^.+?' # filesystem
r'\s+(.*)', # mount
re.MULTILINE)
IGNORED_DRIVES = ['/boot', '/etc']
VALID_FORMATS = {'btrfs', 'ext4', 'ext3', 'ext2', 'vfat'}
VALID_FORMATS = {'btrfs', 'ext4', 'ext3', 'ext2', 'vfat', 'exfat'}
def get_drives_info_psutil() -> List[DriveInfo]:
@ -265,7 +265,7 @@ def get_drives_info_psutil() -> List[DriveInfo]:
if disk.fstype not in VALID_FORMATS:
continue
if disk.device not in info:
# Only use the first use of the partition.
# Only use the first partition.
usage = psutil.disk_usage(disk.mountpoint)
info[disk.device] = DriveInfo(
mount=disk.mountpoint,