Merge pull request #756 from Firminator/patch-1

Update filesystem.py
This commit is contained in:
Anton Hvornum 2021-11-23 06:46:11 +00:00 committed by GitHub
commit e156971191
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -152,7 +152,7 @@ class Filesystem:
if self.mode == MBR:
if len(self.blockdevice.partitions) > 3:
DiskError("Too many partitions on disk, MBR disks can only have 3 parimary partitions")
DiskError("Too many partitions on disk, MBR disks can only have 3 primary partitions")
if partition_format:
parted_string = f'{self.blockdevice.device} mkpart {partition_type} {partition_format} {start} {end}'
@ -178,10 +178,10 @@ class Filesystem:
raise err
else:
count += 1
log(f"Could not get uuid for partition. Waiting for the {count} time",level=logging.DEBUG)
log(f"Could not get UUID for partition. Waiting for the {count} time",level=logging.DEBUG)
time.sleep(float(storage['arguments'].get('disk-sleep', 0.2)))
else:
log("Add partition exiting due to excesive wait time",level=logging.INFO)
log("Add partition is exiting due to excessive wait time",level=logging.INFO)
raise DiskError(f"New partition never showed up after adding new partition on {self}.")
def set_name(self, partition: int, name: str):
@ -192,7 +192,7 @@ class Filesystem:
return self.parted(f'{self.blockdevice.device} set {partition + 1} {string}') == 0
def parted_mklabel(self, device: str, disk_label: str):
log(f"Creating a new partition labling on {device}", level=logging.INFO, fg="yellow")
log(f"Creating a new partition label on {device}", level=logging.INFO, fg="yellow")
# Try to unmount devices before attempting to run mklabel
try:
SysCommand(f'bash -c "umount {device}?"')