Remove superfluous use of `partprobe` (#2212)
This commit is contained in:
parent
6ee6d1eda0
commit
f876ddc68e
|
|
@ -378,7 +378,6 @@ class DeviceHandler(object):
|
||||||
attempts = 3
|
attempts = 3
|
||||||
lsblk_info: Optional[LsblkInfo] = None
|
lsblk_info: Optional[LsblkInfo] = None
|
||||||
|
|
||||||
self.partprobe(path)
|
|
||||||
for attempt_nr in range(attempts):
|
for attempt_nr in range(attempts):
|
||||||
time.sleep(attempt_nr + 1)
|
time.sleep(attempt_nr + 1)
|
||||||
lsblk_info = get_lsblk_info(path)
|
lsblk_info = get_lsblk_info(path)
|
||||||
|
|
@ -386,8 +385,6 @@ class DeviceHandler(object):
|
||||||
if lsblk_info.partn and lsblk_info.partuuid and lsblk_info.uuid:
|
if lsblk_info.partn and lsblk_info.partuuid and lsblk_info.uuid:
|
||||||
break
|
break
|
||||||
|
|
||||||
self.partprobe(path)
|
|
||||||
|
|
||||||
if not lsblk_info:
|
if not lsblk_info:
|
||||||
debug(f'Unable to get partition information: {path}')
|
debug(f'Unable to get partition information: {path}')
|
||||||
raise DiskError(f'Unable to get partition information: {path}')
|
raise DiskError(f'Unable to get partition information: {path}')
|
||||||
|
|
@ -526,8 +523,6 @@ class DeviceHandler(object):
|
||||||
requires_delete = modification.wipe is False
|
requires_delete = modification.wipe is False
|
||||||
self._perform_partitioning(part_mod, modification.device, disk, requires_delete=requires_delete)
|
self._perform_partitioning(part_mod, modification.device, disk, requires_delete=requires_delete)
|
||||||
|
|
||||||
self.partprobe(modification.device.device_info.path)
|
|
||||||
|
|
||||||
def mount(
|
def mount(
|
||||||
self,
|
self,
|
||||||
dev_path: Path,
|
dev_path: Path,
|
||||||
|
|
|
||||||
|
|
@ -162,7 +162,6 @@ class Luks2:
|
||||||
|
|
||||||
# Get crypt-information about the device by doing a reverse lookup starting with the partition path
|
# Get crypt-information about the device by doing a reverse lookup starting with the partition path
|
||||||
# For instance: /dev/sda
|
# For instance: /dev/sda
|
||||||
disk.device_handler.partprobe(self.luks_dev_path)
|
|
||||||
lsblk_info = disk.get_lsblk_info(self.luks_dev_path)
|
lsblk_info = disk.get_lsblk_info(self.luks_dev_path)
|
||||||
|
|
||||||
# For each child (sub-partition/sub-device)
|
# For each child (sub-partition/sub-device)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue