index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton@hvornum.se> | 2022-01-25 16:09:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-25 16:09:34 +0100 |
commit | 1aa738691e261b3dfaf5195ec7636617a283d47a (patch) | |
tree | 984508bfe332ea5cbe3bd2885a9b3c2cfe4ae9d4 /archinstall/lib/disk/partition.py | |
parent | 5406f1ed4541f46b28435434be04e82ee4378f1b (diff) |
-rw-r--r-- | archinstall/lib/disk/partition.py | 14 |
diff --git a/archinstall/lib/disk/partition.py b/archinstall/lib/disk/partition.py index b3db143a..afd34f20 100644 --- a/archinstall/lib/disk/partition.py +++ b/archinstall/lib/disk/partition.py @@ -46,11 +46,12 @@ class Partition: except DiskError: mount_information = {} - 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)}") + if mount_information.get('target', None): + 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)}") - if target := mount_information.get('target', None): - self.mountpoint = target + if target := mount_information.get('target', None): + self.mountpoint = target if not self.filesystem and autodetect_filesystem: if fstype := mount_information.get('fstype', get_filesystem_type(path)): @@ -130,6 +131,9 @@ class Partition: for device in lsblk['blockdevices']: return convert_size_to_gb(device['size']) + elif handle.exit_code == 8192: + # Device is not a block device + return None time.sleep(storage['DISK_TIMEOUTS']) @@ -225,7 +229,7 @@ class Partition: return bind_name def partprobe(self) -> bool: - if SysCommand(f'partprobe {self.block_device.device}').exit_code == 0: + if self.block_device and SysCommand(f'partprobe {self.block_device.device}').exit_code == 0: time.sleep(1) return True return False |