summaryrefslogtreecommitdiffstats
path: root/platform.py
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2009-10-27 19:45:15 +0100
committerHans de Goede <hdegoede@redhat.com>2009-10-28 10:27:53 +0100
commit0d974cb8a7cee879de6695b8b09c9f61c2c99a12 (patch)
treec42b1a3328bf33e5cefba6d624e9d8cc205e8852 /platform.py
parent81b7b447818db245359dea1a4eb23a07b916f720 (diff)
downloadanaconda-0d974cb8a7cee879de6695b8b09c9f61c2c99a12.tar.gz
anaconda-0d974cb8a7cee879de6695b8b09c9f61c2c99a12.tar.xz
anaconda-0d974cb8a7cee879de6695b8b09c9f61c2c99a12.zip
When doing initlabel on a dasd disk create a dasd disklabel (#531209)
As discussed on IRC this changes the platform.diskType property into a platform.diskLabelType method that takes a disk/device type argument and uses this argument to check for dasd disks and in that cases returns dasd as diskLabelType.
Diffstat (limited to 'platform.py')
-rw-r--r--platform.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/platform.py b/platform.py
index 66e222c58..c0cc60295 100644
--- a/platform.py
+++ b/platform.py
@@ -139,15 +139,12 @@ class Platform(object):
return errors
- @property
- def diskLabelType(self):
+ def diskLabelType(self, deviceType):
"""Return the disk label type as a parted.DiskType."""
- return self._diskLabelType
+ if deviceType == parted.DEVICE_DASD:
+ return parted.diskType["dasd"]
- @diskLabelType.setter
- def diskLabelType(self, value):
- """Sets the disk label type."""
- self._diskLabelType = value
+ return self._diskLabelType
@property
def isEfi(self):