From 20d9858cf608047aeb4f7d2511e2163c04f921de Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Tue, 11 May 2021 09:53:18 +0200 Subject: Spelling errors, and filtered the output a bit. --- archinstall/lib/disk.py | 8 ++++---- archinstall/lib/user_interaction.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/archinstall/lib/disk.py b/archinstall/lib/disk.py index ab3560a9..30b66835 100644 --- a/archinstall/lib/disk.py +++ b/archinstall/lib/disk.py @@ -256,7 +256,7 @@ class Partition(): output = b"".join(sys_command(f"sfdisk --json {self.block_device.path}")) output = json.loads(output.decode('UTF-8')) - for partition in output.get('partitionstable', {}).get('partitions', []): + for partition in output.get('partitiontable', {}).get('partitions', []): if partition['node'] == self.path: return partition['start']# * self.sector_size @@ -265,8 +265,8 @@ class Partition(): # TODO: Verify that the logic holds up, that 'size' is the size without 'start' added to it. output = b"".join(sys_command(f"sfdisk --json {self.block_device.path}")) output = json.loads(output.decode('UTF-8')) - - for partition in output.get('partitionstable', {}).get('partitions', []): + + for partition in output.get('partitiontable', {}).get('partitions', []): if partition['node'] == self.path: return partition['size']# * self.sector_size @@ -289,7 +289,7 @@ class Partition(): # } # } - for partition in output.get('partitionstable', {}).get('partitions', []): + for partition in output.get('partitiontable', {}).get('partitions', []): if partition['node'] == self.path: return partition.get('bootable', False) diff --git a/archinstall/lib/user_interaction.py b/archinstall/lib/user_interaction.py index f51fb4a4..8eaf753e 100644 --- a/archinstall/lib/user_interaction.py +++ b/archinstall/lib/user_interaction.py @@ -592,7 +592,7 @@ def wipe_and_create_partitions(block_device): else: partition_type = 'msdos' - partitions_result = [part.__dump__() for part in block_device.partitions] + partitions_result = [part.__dump__() for part in block_device.partitions.values()] suggested_layout = [ { # Boot "type" : "primary", @@ -641,7 +641,7 @@ def wipe_and_create_partitions(block_device): if len(partitions_result): print('Current partition layout:') for partition in partitions_result: - print(partition) + print({key: val for key, val in partition.items() if val}) print() task = generic_select(modes, -- cgit v1.2.3-70-g09d2