diff options
author | bfox <bfox> | 2001-08-01 16:29:52 +0000 |
---|---|---|
committer | bfox <bfox> | 2001-08-01 16:29:52 +0000 |
commit | 37b8e297ba9085384eef7c0611819280ff8352e8 (patch) | |
tree | 9b186f129caca07a39fb5405f8da13e7952a9f94 | |
parent | 98d9f6cf61e60e992127217b66427082bc94ea81 (diff) | |
download | anaconda-37b8e297ba9085384eef7c0611819280ff8352e8.tar.gz anaconda-37b8e297ba9085384eef7c0611819280ff8352e8.tar.xz anaconda-37b8e297ba9085384eef7c0611819280ff8352e8.zip |
prompt the user if they click the RAID button and less than two software RAID partitions currently exist
-rw-r--r-- | iw/partition_gui.py | 8 | ||||
-rw-r--r-- | textw/partition_text.py | 12 |
2 files changed, 20 insertions, 0 deletions
diff --git a/iw/partition_gui.py b/iw/partition_gui.py index 3bf89efb0..30d7ee1d1 100644 --- a/iw/partition_gui.py +++ b/iw/partition_gui.py @@ -1285,6 +1285,14 @@ class PartitionWindow(InstallWindow): self.partitions, raidrequest) + # if no raid partitions exist, raise an error message and return + if len(availraidparts) < 2: + dlg = GnomeMessageBox(_("At least two software RAID partitions are needed."), + MESSAGE_BOX_ERROR,STOCK_BUTTON_OK) + dlg.show() + dlg.run_and_close + return + # Mount Point entry maintable.attach(createAlignedLabel(_("Mount Point:")), 0, 1, row, row + 1) diff --git a/textw/partition_text.py b/textw/partition_text.py index e7ed4e095..844f8e34c 100644 --- a/textw/partition_text.py +++ b/textw/partition_text.py @@ -387,6 +387,7 @@ class PartitionWindow: disks = self.diskset.disks.keys() drivelist = CheckboxTree(height=2, scroll=1) avail = get_available_raid_partitions(self.diskset, self.partitions, request) + # XXX if not request.raidmembers: for (part, size, used) in avail: @@ -798,6 +799,17 @@ class PartitionWindow: row = row + 1 drivegrid = Grid(2, 1) + + #Let's see if we have any RAID partitions to make a RAID device with + avail = get_available_raid_partitions(self.diskset, self.partitions, raidrequest) + + #If we don't, then tell the user that none exist + if len(avail) < 2: + ButtonChoiceWindow (self.screen, _("No RAID partitions"), + _("At least two software RAID partitions are needed."), + [ TEXT_OK_BUTTON ]) + return + (self.drivelist, drivesubgrid) = self.makeRaidDriveList(raidrequest) drivegrid.setField(drivesubgrid, 0, 0, (0,0,4,0), anchorLeft = 1, anchorTop = 1) |