Rename platform.diskType to platform.diskLabelType, as diskType is confusing (we usally use it to refer to is the disk dasd, iscsi, zfcp, etc.). --- platform.py | 30 +++++++++++++++--------------- storage/formats/disklabel.py | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/platform.py b/platform.py index d279c18..66e222c 100644 --- a/platform.py +++ b/platform.py @@ -39,7 +39,7 @@ class Platform(object): architecture quirks in one place to avoid lots of platform checks throughout anaconda.""" _bootFSTypes = ["ext3"] - _diskType = parted.diskType["msdos"] + _diskLabelType = parted.diskType["msdos"] _isEfi = iutil.isEfi() _minimumSector = 0 _packages = [] @@ -140,14 +140,14 @@ class Platform(object): return errors @property - def diskType(self): + def diskLabelType(self): """Return the disk label type as a parted.DiskType.""" - return self._diskType + return self._diskLabelType - @diskType.setter - def diskType(self, value): + @diskLabelType.setter + def diskLabelType(self, value): """Sets the disk label type.""" - self._diskType = value + self._diskLabelType = value @property def isEfi(self): @@ -198,7 +198,7 @@ class Platform(object): class EFI(Platform): _bootFSTypes = ["ext4", "ext3", "ext2"] - _diskType = parted.diskType["gpt"] + _diskLabelType = parted.diskType["gpt"] _minBootPartSize = 50 _maxBootPartSize = 256 @@ -249,7 +249,7 @@ class EFI(Platform): return 0 class Alpha(Platform): - _diskType = parted.diskType["bsd"] + _diskLabelType = parted.diskType["bsd"] def checkBootRequest(self, req): errors = Platform.checkBootRequest(self, req) @@ -260,7 +260,7 @@ class Alpha(Platform): disk = req.disk.format.partedDisk # Check that we're a BSD disk label - if not disk.type == self.diskType.name: + if not disk.type == self.diskLabelType.name: errors.append(_("%s must have a bsd disk label.") % req.disk.name) # The first free space should start at the beginning of the drive and @@ -361,7 +361,7 @@ class IPSeriesPPC(PPC): return 0 class NewWorldPPC(PPC): - _diskType = parted.diskType["mac"] + _diskLabelType = parted.diskType["mac"] _minBootPartSize = (800.00 / 1024.00) _maxBootPartSize = 1 @@ -403,7 +403,7 @@ class NewWorldPPC(PPC): disk = req.disk.format.partedDisk # Check that we're a Mac disk label - if not disk.type == self.diskType.name: + if not disk.type == self.diskLabelType.name: errors.append(_("%s must have a mac disk label.") % req.disk.name) # All of the above just checks the appleboot partitions. We still @@ -433,7 +433,7 @@ class NewWorldPPC(PPC): return 0 class PS3(PPC): - _diskType = parted.diskType["msdos"] + _diskLabelType = parted.diskType["msdos"] def __init__(self, anaconda): PPC.__init__(self, anaconda) @@ -445,7 +445,7 @@ class S390(Platform): Platform.__init__(self, anaconda) class Sparc(Platform): - _diskType = parted.diskType["sun"] + _diskLabelType = parted.diskType["sun"] @property def minimumSector(self, disk): @@ -463,9 +463,9 @@ class X86(EFI): EFI.__init__(self, anaconda) if self.isEfi: - self.diskType = parted.diskType["gpt"] + self.diskLabelType = parted.diskType["gpt"] else: - self.diskType = parted.diskType["msdos"] + self.diskLabelType = parted.diskType["msdos"] def bootDevice(self): if self.isEfi: diff --git a/storage/formats/disklabel.py b/storage/formats/disklabel.py index 9d07d31..a6e3352 100644 --- a/storage/formats/disklabel.py +++ b/storage/formats/disklabel.py @@ -92,7 +92,7 @@ class DiskLabel(DeviceFormat): def freshPartedDisk(self): """ Return a new, empty parted.Disk instance for this device. """ log_method_call(self, device=self.device) - labelType = platform.getPlatform(None).diskType + labelType = platform.getPlatform(None).diskLabelType return parted.freshDisk(device=self.partedDevice, ty=labelType) @property -- 1.6.5.1 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list