diff options
author | Chris Lumens <clumens@redhat.com> | 2006-02-01 16:19:45 +0000 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2006-02-01 16:19:45 +0000 |
commit | caa9d808c38deb21b5c9f264248058be432dadf8 (patch) | |
tree | cd7450723a6e2dbdaf8bbc10c72a54d6c0a3a6d9 /kickstart.py | |
parent | ed82180e832a6d76def27687a7e8491f8915256c (diff) | |
download | anaconda-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.py | 6 |
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: |