diff options
author | David Cantrell <dcantrell@redhat.com> | 2007-06-21 14:21:59 +0000 |
---|---|---|
committer | David Cantrell <dcantrell@redhat.com> | 2007-06-21 14:21:59 +0000 |
commit | 40e77b297338f1b6d7afd6141564f745622b1391 (patch) | |
tree | c3ead4b77c4ac08b86372b53d8f97eacd610589f /iw | |
parent | 132e02304760e36c9321c07cafa1cd7c4ac41f39 (diff) | |
download | anaconda-40e77b297338f1b6d7afd6141564f745622b1391.tar.gz anaconda-40e77b297338f1b6d7afd6141564f745622b1391.tar.xz anaconda-40e77b297338f1b6d7afd6141564f745622b1391.zip |
* iw/netconfig_dialog.py (NetworkConfigurator): Handle IPMissing
exceptions and log error message when configNetDevice() fails.
Patch from HARA Hiroshi <hhara AT miraclelinux DOT com>.
Diffstat (limited to 'iw')
-rw-r--r-- | iw/netconfig_dialog.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/iw/netconfig_dialog.py b/iw/netconfig_dialog.py index 55852fe9c..a1829838a 100644 --- a/iw/netconfig_dialog.py +++ b/iw/netconfig_dialog.py @@ -177,6 +177,9 @@ class NetworkConfigurator: try: network.sanityCheckIPString(ipv4addr) netdev.set(('ipaddr', ipv4addr)) + except network.IPMissing, msg: + self._handleIPError(_("IP Address"), msg) + return except network.IPError, msg: self._handleIPError(_("IP Address"), msg) return @@ -184,12 +187,18 @@ class NetworkConfigurator: try: network.sanityCheckIPString(ipv4nm) netdev.set(('netmask', ipv4nm)) + except network.IPMissing, msg: + self._handleIPError(_("Netmask"), msg) + return except network.IPError, msg: self._handleIPError(_("Netmask"), msg) return try: network.sanityCheckIPString(gateway) + except network.IPMissing, msg: + self._handleIPError(_("Gateway"), msg) + return except network.IPError, msg: self._handleIPError(_("Gateway"), msg) return @@ -205,6 +214,8 @@ class NetworkConfigurator: try: isys.configNetDevice(netdev, gateway) except Exception, e: + import logging + log = logging.getLogger("anaconda") log.error("Error configuring network device: %s" %(e,)) self.rc = gtk.RESPONSE_OK if ns: |