diff options
Diffstat (limited to 'kickstart.py')
-rw-r--r-- | kickstart.py | 9 |
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) |