Skip to content

Commit

Permalink
storage: make _get_windows_data more robust
Browse files Browse the repository at this point in the history
  File "/usr/lib/python3.13/site-packages/dasbus/server/handler.py", line 265, in _handle_call
    return handler(*parameters, **additional_args)
  File "/usr/lib64/python3.13/site-packages/pyanaconda/modules/storage/devicetree/viewer_interface.py", line 194, in GetExistingSystems
    return OSData.to_structure_list(self.implementation.get_existing_systems())
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib64/python3.13/site-packages/pyanaconda/modules/storage/devicetree/viewer.py", line 493, in get_existing_systems
    windows_data = self._get_windows_data()
  File "/usr/lib64/python3.13/site-packages/pyanaconda/modules/storage/devicetree/viewer.py", line 530, in _get_windows_data
    if str(device.part_type_uuid) == EFI_PARTITION_TYPE:
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/blivet/threads.py", line 49, in run_with_lock
    return m(*args, **kwargs)
  File "/usr/lib/python3.13/site-packages/blivet/devices/partition.py", line 380, in part_type_uuid
    if hasattr(parted.Partition, "type_uuid") and self.parted_partition.type_uuid:
                                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'type_uuid'
  • Loading branch information
rvykydal committed Sep 3, 2024
1 parent 56b53e6 commit 5e95090
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions pyanaconda/modules/storage/devicetree/viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,12 +527,13 @@ def _get_windows_data(self):
continue

device = self._get_device(blivet_device.name)
if str(device.part_type_uuid) == EFI_PARTITION_TYPE:
efi_partition = device
continue
if device and device.parted_partition:
if str(device.part_type_uuid) == EFI_PARTITION_TYPE:
efi_partition = device
continue

if str(device.part_type_uuid) in WINDOWS_PARTITION_TYPES:
windows_data.devices.append(device.name)
if str(device.part_type_uuid) in WINDOWS_PARTITION_TYPES:
windows_data.devices.append(device.name)

if len(windows_data.devices) > 0:
if efi_partition is not None:
Expand Down

0 comments on commit 5e95090

Please sign in to comment.