summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2009-01-27 14:25:36 -1000
committerDavid Cantrell <dcantrell@redhat.com>2009-02-12 11:29:58 -1000
commitbacf400d106843e0624fda498b289a67ac99d648 (patch)
treeffb9de1ecef13926225624e29a4c18d8da3945be
parent1af68739613b7017939aaf0c3c7375c4e0717bbe (diff)
downloadanaconda-bacf400d106843e0624fda498b289a67ac99d648.tar.gz
anaconda-bacf400d106843e0624fda498b289a67ac99d648.tar.xz
anaconda-bacf400d106843e0624fda498b289a67ac99d648.zip
Syntax fixes for the new pyparted.
To get a parted.Device object, we call: parted.getDevice(path) To create a new parted.Disk object, we need a parted.Device and we call: parted.Disk(device=parted.Device)
-rwxr-xr-xisys/isys.py2
-rw-r--r--partedUtils.py1
-rw-r--r--raid.py6
3 files changed, 5 insertions, 4 deletions
diff --git a/isys/isys.py b/isys/isys.py
index 589461764..e6c4b3476 100755
--- a/isys/isys.py
+++ b/isys/isys.py
@@ -462,7 +462,7 @@ def driveDict(klassArg):
continue
if device.startswith("sd"):
- peddev = parted.PedDevice.get(dev['device'])
+ peddev = parted.getDevice(dev['device'])
model = peddev.model
# blacklist *STMF on power5 iSeries boxes
diff --git a/partedUtils.py b/partedUtils.py
index f88580507..400b04977 100644
--- a/partedUtils.py
+++ b/partedUtils.py
@@ -21,6 +21,7 @@
# Jeremy Katz <katzj@redhat.com>
# Mike Fulbright <msf@redhat.com>
# Karsten Hopp <karsten@redhat.com>
+# David Cantrell <dcantrell@redhat.com>
#
"""Helper functions for use when dealing with parted objects."""
diff --git a/raid.py b/raid.py
index 5eb7cb9ad..c0f2e692f 100644
--- a/raid.py
+++ b/raid.py
@@ -66,15 +66,15 @@ def scanForRaid(drives):
drives is a list of device names.
Returns a list of (mdMinor, devices, level, totalDisks) tuples.
"""
-
+
raidSets = {}
raidDevices = {}
for d in drives:
parts = []
try:
- dev = parted.PedDevice.get("/dev/%s" % (d,))
- disk = parted.PedDisk.new(dev)
+ dev = parted.getDevice("/dev/%s" % (d,))
+ disk = parted.Disk(device=dev)
raidParts = disk.getRaidPartitions()
for part in raidParts: