From 4ea7feb04e2a742435b45db242c91c0f2b88000c Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Thu, 11 Nov 2021 14:16:14 +0000 Subject: Added more debugging (some duplicate, but that's fine) --- archinstall/lib/disk/blockdevice.py | 5 ++++- archinstall/lib/disk/filesystem.py | 15 +++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) (limited to 'archinstall/lib') diff --git a/archinstall/lib/disk/blockdevice.py b/archinstall/lib/disk/blockdevice.py index 5204f09b..8ee5e74a 100644 --- a/archinstall/lib/disk/blockdevice.py +++ b/archinstall/lib/disk/blockdevice.py @@ -217,7 +217,7 @@ class BlockDevice: def get_partition(self, uuid): count = 0 while count < 5: - for partition in self: + for partition in self.partitions: if partition.uuid == uuid: return partition else: @@ -226,4 +226,7 @@ class BlockDevice: count += 1 else: log(f"Could not find {uuid} in disk after 5 retries",level=logging.INFO) + print(f"Partitions: {self.partitions}") + print(f"UUID parts: {partition.uuid for partition in self.partitions}") + print(f"UUID: {[uuid]}") raise DiskError(f"New partition {uuid} never showed up after adding new partition on {self}") diff --git a/archinstall/lib/disk/filesystem.py b/archinstall/lib/disk/filesystem.py index 28df097e..cf2a286e 100644 --- a/archinstall/lib/disk/filesystem.py +++ b/archinstall/lib/disk/filesystem.py @@ -165,13 +165,16 @@ class Filesystem: new_uuid_set = (previous_partition_uuids ^ {partition.uuid for partition in self.blockdevice.partitions.values()}) if len(new_uuid_set) > 0: new_uuid = new_uuid_set.pop() - print('Blockdevice:', self.blockdevice) - print('Partitions:', self.blockdevice.partitions) - print('Partition set:', new_uuid_set) - print('New UUID:', [new_uuid]) - print('get_partition():', self.blockdevice.get_partition) if new_uuid: - return self.blockdevice.get_partition(new_uuid) + try: + return self.blockdevice.get_partition(new_uuid) + except Exception as err: + print('Blockdevice:', self.blockdevice) + print('Partitions:', self.blockdevice.partitions) + print('Partition set:', new_uuid_set) + print('New UUID:', [new_uuid]) + print('get_partition():', self.blockdevice.get_partition) + raise err else: count += 1 log(f"Could not get uuid for partition. Waiting for the {count} time",level=logging.DEBUG) -- cgit v1.2.3-70-g09d2