diff options
author | David Cantrell <dcantrell@redhat.com> | 2009-01-27 20:09:08 -1000 |
---|---|---|
committer | David Cantrell <dcantrell@redhat.com> | 2009-02-12 11:30:03 -1000 |
commit | e86d17a13c26a57b8745b1951dace73ae6372de9 (patch) | |
tree | 1d40a1879386ccf8e33673a8ec512e02affb79f6 /partIntfHelpers.py | |
parent | 6926d406cdd73b9da40e9c4a4e4b740b4566736d (diff) | |
download | anaconda-e86d17a13c26a57b8745b1951dace73ae6372de9.tar.gz anaconda-e86d17a13c26a57b8745b1951dace73ae6372de9.tar.xz anaconda-e86d17a13c26a57b8745b1951dace73ae6372de9.zip |
Syntax changes for the new pyparted.
1) Iterate over partitions with a for loop over
disk.partitions.values() rather than calling next_partition()
2) Call getFlag() rather than get_flag()
3) Call setFlag() to enable a flag, call unsetFlag() to disable
a flag.
4) Reference the active property rather than calling the
is_active() method.
And other fixes.
Diffstat (limited to 'partIntfHelpers.py')
-rw-r--r-- | partIntfHelpers.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/partIntfHelpers.py b/partIntfHelpers.py index f2338ded2..8dc195e36 100644 --- a/partIntfHelpers.py +++ b/partIntfHelpers.py @@ -382,7 +382,7 @@ def checkForSwapNoMatch(anaconda): part = parted.getPartitionByName(request.device) if (part and (not part.type & parted.PARTITION_FREESPACE) - and (part.get_flag(parted.LINUX_SWAP)) + and (part.getFlag(parted.PARTITION_SWAP)) and (request.fstype and request.fstype.getName() != "swap") and (not request.format)): rc = anaconda.intf.messageWindow(_("Format as Swap?"), @@ -393,15 +393,15 @@ def checkForSwapNoMatch(anaconda): "Would you like to format this " "partition as a swap partition?") % (request.device), type = "yesno", - custom_icon="question") + custom_icon="question") if rc == 1: request.format = 1 request.fstype = fsset.fileSystemTypeGet("swap") if request.fstype.getName() == "software RAID": - part.set_flag(parted.PARTITION_RAID, 1) + part.setFlag(parted.PARTITION_RAID) else: - part.set_flag(parted.PARTITION_RAID, 0) - + part.unsetFlag(parted.PARTITION_RAID) + partedUtils.set_partition_file_system_type(part, request.fstype) |