diff options
author | David Cantrell <dcantrell@redhat.com> | 2009-01-27 14:25:36 -1000 |
---|---|---|
committer | David Cantrell <dcantrell@redhat.com> | 2009-02-12 11:29:58 -1000 |
commit | bacf400d106843e0624fda498b289a67ac99d648 (patch) | |
tree | ffb9de1ecef13926225624e29a4c18d8da3945be | |
parent | 1af68739613b7017939aaf0c3c7375c4e0717bbe (diff) | |
download | anaconda-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-x | isys/isys.py | 2 | ||||
-rw-r--r-- | partedUtils.py | 1 | ||||
-rw-r--r-- | raid.py | 6 |
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.""" @@ -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: |