summaryrefslogtreecommitdiffstats
path: root/textw
diff options
context:
space:
mode:
authorbfox <bfox>2001-08-01 16:29:52 +0000
committerbfox <bfox>2001-08-01 16:29:52 +0000
commit37b8e297ba9085384eef7c0611819280ff8352e8 (patch)
tree9b186f129caca07a39fb5405f8da13e7952a9f94 /textw
parent98d9f6cf61e60e992127217b66427082bc94ea81 (diff)
downloadanaconda-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
Diffstat (limited to 'textw')
-rw-r--r--textw/partition_text.py12
1 files changed, 12 insertions, 0 deletions
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)