This just prevents us from trying to use self.partType if it is None. --- storage/devices.py | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/storage/devices.py b/storage/devices.py index 53c3d83..c6fbdcc 100644 --- a/storage/devices.py +++ b/storage/devices.py @@ -997,19 +997,23 @@ class PartitionDevice(StorageDevice): @property def isExtended(self): - return self.partType & parted.PARTITION_EXTENDED + return (self.partType is not None and + self.partType & parted.PARTITION_EXTENDED) @property def isLogical(self): - return self.partType & parted.PARTITION_LOGICAL + return (self.partType is not None and + self.partType & parted.PARTITION_LOGICAL) @property def isPrimary(self): - return self.partType == parted.PARTITION_NORMAL + return (self.partType is not None and + self.partType == parted.PARTITION_NORMAL) @property def isProtected(self): - return self.partType & parted.PARTITION_PROTECTED + return (self.partType is not None and + self.partType & parted.PARTITION_PROTECTED) def _getPartedPartition(self): return self._partedPartition -- 1.6.0.6 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list