index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton@hvornum.se> | 2021-11-20 22:21:00 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-20 22:21:00 +0000 |
commit | 66e23af42290cf998b966523d4520a2110b0806b (patch) | |
tree | 5dcc6c9b47cf9cf6ecafb47fbe717c2581133c1e /archinstall/lib/disk | |
parent | 627b6b5207beffee2ed9507933cebe780c62a11d (diff) | |
parent | 91d030a09c26f56ece0de72e3536ad31d48595ec (diff) |
-rw-r--r-- | archinstall/lib/disk/partition.py | 10 |
diff --git a/archinstall/lib/disk/partition.py b/archinstall/lib/disk/partition.py index f8378d47..e2083649 100644 --- a/archinstall/lib/disk/partition.py +++ b/archinstall/lib/disk/partition.py @@ -136,7 +136,7 @@ class Partition: @property def partition_type(self): lsblk = json.loads(SysCommand(f"lsblk --json -o+PTTYPE {self.path}").decode('UTF-8')) - + for device in lsblk['blockdevices']: return device['pttype'] @@ -153,7 +153,7 @@ class Partition: partuuid_struct = SysCommand(f'lsblk -J -o+PARTUUID {self.path}') if partuuid_struct.exit_code == 0: if partition_information := next(iter(json.loads(partuuid_struct.decode('UTF-8'))['blockdevices']), None): - if (partuuid := partition_information.get('partuuid', None)): + if partuuid := partition_information.get('partuuid', None): return partuuid time.sleep(storage['DISK_TIMEOUTS']) @@ -172,7 +172,7 @@ class Partition: partuuid_struct = SysCommand(f'lsblk -J -o+PARTUUID {self.path}') if partuuid_struct.exit_code == 0: if partition_information := next(iter(json.loads(partuuid_struct.decode('UTF-8'))['blockdevices']), None): - if (partuuid := partition_information.get('partuuid', None)): + if partuuid := partition_information.get('partuuid', None): return partuuid @property @@ -296,7 +296,7 @@ class Partition: elif filesystem == 'f2fs': options = ['-f'] + options - + if (handle := SysCommand(f"/usr/bin/mkfs.f2fs {' '.join(options)} {path}")).exit_code != 0: raise DiskError(f"Could not format {path} with {filesystem} because: {handle.decode('UTF-8')}") self.filesystem = filesystem @@ -378,7 +378,7 @@ class Partition: try: self.format(self.filesystem, '/dev/null', log_formatting=False, allow_formatting=True) except (SysCallError, DiskError): - pass # We supported it, but /dev/null is not formatable as expected so the mkfs call exited with an error code + pass # We supported it, but /dev/null is not formattable as expected so the mkfs call exited with an error code except UnknownFilesystemFormat as err: raise err return True |