Skip to content

Commit

Permalink
Merge pull request #1265 from AdamWill/type-uuid-not-none
Browse files Browse the repository at this point in the history
part_type_uuid: guard against pyparted type_uuid being None
  • Loading branch information
vojtechtrefny authored Jul 28, 2024
2 parents 7de4334 + 9fc508f commit 3d601ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions blivet/devices/partition.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,10 +377,10 @@ def part_type_uuid(self):
if not self.exists:
return self.part_type_uuid_req
else:
if hasattr(parted.Partition, "type_uuid"):
if hasattr(parted.Partition, "type_uuid") and self.parted_partition.type_uuid:
try:
return UUID(bytes=self.parted_partition.type_uuid)
except AttributeError:
except (TypeError, ValueError, AttributeError):
pass
return self._part_type_uuid

Expand Down

0 comments on commit 3d601ea

Please sign in to comment.