summaryrefslogtreecommitdiffstats
path: root/raid.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2007-03-22 17:29:34 +0000
committerChris Lumens <clumens@redhat.com>2007-03-22 17:29:34 +0000
commitef4de7d3c5a4029521eb4d290e8a2ffe9633f5ce (patch)
tree8242a811efb4dc0896ec3f56b222fb058b8b4aa8 /raid.py
parente8e4b2267565ae3f95f46d6e08616c5ddbc9c1f9 (diff)
downloadanaconda-ef4de7d3c5a4029521eb4d290e8a2ffe9633f5ce.tar.gz
anaconda-ef4de7d3c5a4029521eb4d290e8a2ffe9633f5ce.tar.xz
anaconda-ef4de7d3c5a4029521eb4d290e8a2ffe9633f5ce.zip
More RAID10 fixes (#230268).
Diffstat (limited to 'raid.py')
-rw-r--r--raid.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/raid.py b/raid.py
index 7948a9b3f..4c11a8af6 100644
--- a/raid.py
+++ b/raid.py
@@ -4,7 +4,7 @@
#
# Erik Troan <ewt@redhat.com>
#
-# Copyright 1999-2002 Red Hat, Inc.
+# Copyright 1999-2007 Red Hat, Inc.
#
# This software may be freely redistributed under the terms of the GNU
# library public license.
@@ -25,10 +25,12 @@ def getRaidLevels():
for l in f.readlines():
if not l.startswith("Personalities"):
continue
- for tok in l.split():
- for lev in ("RAID0", "RAID1", "RAID5", "RAID6", "RAID10"):
- if tok.upper().find(lev) != -1:
- avail.append(lev)
+
+ lst = l.split()
+
+ for lev in ["RAID0", "RAID1", "RAID5", "RAID6", "RAID10"]:
+ if "[" + lev + "]" in lst or "[" + lev.lower() + "]" in lst:
+ avail.append(lev)
f.close()