Added a dummy function call to grab the partition fstype, since unmounted filesystems won't return the fstype obviously.

This commit is contained in:
Anton Hvornum 2021-02-07 20:46:12 +01:00
parent 62a14d0945
commit 03c46cce2b
1 changed files with 1 additions and 0 deletions

View File

@ -133,6 +133,7 @@ class Partition():
self.mount(mountpoint)
mount_information = get_mount_info(self.path)
actual_fstype = get_filesystem_type(self.path) # blkid -o value -s TYPE self.path
if self.mountpoint != mount_information.get('target', None) and mountpoint:
raise DiskError(f"{self} was given a mountpoint but the actual mountpoint differs: {mount_information.get('target', None)}")