diff options
author | Chris Lumens <clumens@redhat.com> | 2008-08-27 16:01:14 -0400 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2008-08-27 16:01:14 -0400 |
commit | 3547c35adbd15dcdf679ab4b5627a2d12530597f (patch) | |
tree | 97c29868955016a5a00e0cbd138fb1a561c7ce37 /kickstart.py | |
parent | fafcceb8103dfcf74f0f50279e88ae7e05e3b01e (diff) | |
download | anaconda-3547c35adbd15dcdf679ab4b5627a2d12530597f.tar.gz anaconda-3547c35adbd15dcdf679ab4b5627a2d12530597f.tar.xz anaconda-3547c35adbd15dcdf679ab4b5627a2d12530597f.zip |
When the wrong filesystem type is used, raise a more explicit error.
Diffstat (limited to 'kickstart.py')
-rw-r--r-- | kickstart.py | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/kickstart.py b/kickstart.py index 7e6b997bc..08f08e5a5 100644 --- a/kickstart.py +++ b/kickstart.py @@ -313,7 +313,10 @@ class LogVol(commands.logvol.F9_LogVol): lvd.grow = True else: if lvd.fstype != "": - filesystem = fileSystemTypeGet(lvd.fstype) + try: + filesystem = fileSystemTypeGet(lvd.fstype) + except KeyError: + raise KickstartValueError, formatErrorMsg(self.lineno, msg="The \"%s\" filesystem type is not supported." % lvd.fstype) else: filesystem = fileSystemTypeGetDefault() @@ -518,7 +521,10 @@ class Partition(commands.partition.F9_Partition): elif pd.mountpoint == "None": pd.mountpoint = "" if pd.fstype: - filesystem = fileSystemTypeGet(pd.fstype) + try: + filesystem = fileSystemTypeGet(pd.fstype) + except KeyError: + raise KickstartValueError, formatErrorMsg(self.lineno, msg="The \"%s\" filesystem type is not supported." % pd.fstype) else: filesystem = fileSystemTypeGetDefault() elif pd.mountpoint == 'appleboot': @@ -554,7 +560,10 @@ class Partition(commands.partition.F9_Partition): fsopts = "defaults,uid=0,gid=0,umask=0077,shortname=winnt" else: if pd.fstype != "": - filesystem = fileSystemTypeGet(pd.fstype) + try: + filesystem = fileSystemTypeGet(pd.fstype) + except KeyError: + raise KickstartValueError, formatErrorMsg(self.lineno, msg="The \"%s\" filesystem type is not supported." % pd.fstype) else: filesystem = fileSystemTypeGetDefault() @@ -634,7 +643,10 @@ class Raid(commands.raid.F9_Raid): rd.mountpoint = "" else: if rd.fstype != "": - filesystem = fileSystemTypeGet(rd.fstype) + try: + filesystem = fileSystemTypeGet(rd.fstype) + except KeyError: + raise KickstartValueError, formatErrorMsg(self.lineno, msg="The \"%s\" filesystem type is not supported." % rd.fstype) else: filesystem = fileSystemTypeGetDefault() |