summaryrefslogtreecommitdiffstats
path: root/kickstart.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2006-02-01 16:19:45 +0000
committerChris Lumens <clumens@redhat.com>2006-02-01 16:19:45 +0000
commitcaa9d808c38deb21b5c9f264248058be432dadf8 (patch)
treecd7450723a6e2dbdaf8bbc10c72a54d6c0a3a6d9 /kickstart.py
parented82180e832a6d76def27687a7e8491f8915256c (diff)
downloadanaconda-caa9d808c38deb21b5c9f264248058be432dadf8.tar.gz
anaconda-caa9d808c38deb21b5c9f264248058be432dadf8.tar.xz
anaconda-caa9d808c38deb21b5c9f264248058be432dadf8.zip
Provide an error dialog if there's a problem in the way LVM commands are given.
Diffstat (limited to 'kickstart.py')
-rw-r--r--kickstart.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/kickstart.py b/kickstart.py
index 8a2bb0d8b..907c4a2bf 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -220,7 +220,11 @@ class AnacondaKSHandlers(KickstartHandlers):
elif lvd.percent <= 0 or lvd.percent > 100:
raise KickstartValueError, formatErrorMsg(self.lineno, msg="Percentage must be between 0 and 100")
- vgid = self.ksVGMapping[lvd.vgname]
+ try:
+ vgid = self.ksVGMapping[lvd.vgname]
+ except KeyError:
+ raise KickstartValueError, formatErrorMsg(self.lineno, msg="No volume group exists with the name '%s'. Specify volume groups before logical volumes." % lvd.vgname)
+
for areq in id.partitions.autoPartitionRequests:
if areq.type == REQUEST_LV:
if areq.volumeGroup == vgid and areq.logicalVolumeName == lvd.name: