summaryrefslogtreecommitdiffstats
path: root/kickstart.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2005-11-21 16:57:37 +0000
committerChris Lumens <clumens@redhat.com>2005-11-21 16:57:37 +0000
commit9c147643c671a34153f27128b4b435981a147bee (patch)
tree4cd17fc77cabae28d4fd841dd44fb50f7e3552d5 /kickstart.py
parent8e71519ae4b61dbcaf520409d421a591118d11b7 (diff)
downloadanaconda-9c147643c671a34153f27128b4b435981a147bee.tar.gz
anaconda-9c147643c671a34153f27128b4b435981a147bee.tar.xz
anaconda-9c147643c671a34153f27128b4b435981a147bee.zip
Show a more helpful error message.
Diffstat (limited to 'kickstart.py')
-rw-r--r--kickstart.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/kickstart.py b/kickstart.py
index e0c7aaafa..d2cafaf72 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -262,9 +262,12 @@ class AnacondaKSHandlers(KickstartHandlers):
KickstartHandlers.doNetwork(self, args)
nd = self.ksdata.network[-1]
- id.instClass.setNetwork(id, nd.bootProto, nd.ip, nd.netmask,
- nd.ethtool, nd.device, nd.onboot,
- nd.dhcpclass, nd.essid, nd.wepkey)
+ try:
+ id.instClass.setNetwork(id, nd.bootProto, nd.ip, nd.netmask,
+ nd.ethtool, nd.device, nd.onboot,
+ nd.dhcpclass, nd.essid, nd.wepkey)
+ except KeyError:
+ raise KickstartValueError, formatErrorMsg(self.lineno, msg="The provided network interface %s does not exist" % nd.device)
if nd.hostname != "":
id.instClass.setHostname(id, nd.hostname, override=1)