diff options
-rw-r--r-- | iw/netconfig_dialog.py | 24 | ||||
-rw-r--r-- | textw/netconfig_text.py | 2 |
2 files changed, 7 insertions, 19 deletions
diff --git a/iw/netconfig_dialog.py b/iw/netconfig_dialog.py index 6a8bdc7fc..5eac64da2 100644 --- a/iw/netconfig_dialog.py +++ b/iw/netconfig_dialog.py @@ -188,23 +188,10 @@ class NetworkConfigurator: d.run() d.destroy() - def _handleNetworkError(self, field): - d = gtk.MessageDialog(None, 0, gtk.MESSAGE_ERROR, - gtk.BUTTONS_OK, - _("An error occurred trying to bring up the " - "%s network interface.") % (field,)) - d.set_title(_("Error Configuring Network")) - d.set_position(gtk.WIN_POS_CENTER) - gui.addFrame(d) - d.run() - d.destroy() - def _cancel(self, *args): self.rc = gtk.RESPONSE_CANCEL def _ok(self, *args): - self.rc = gtk.RESPONSE_OK - haveNet = False combo = self.xml.get_widget("interfaceCombo") active = combo.get_active_iter() val = combo.get_model().get_value(active, 1) @@ -218,8 +205,9 @@ class NetworkConfigurator: w = gui.WaitWindow(_("Dynamic IP"), _("Sending request for IP information " "for %s...") % (netdev.get('DEVICE'),)) - haveNet = self.network.bringUp() + self.network.bringUp() w.pop() + self.rc = gtk.RESPONSE_OK else: netdev.set(('BOOTPROTO', 'static')) ipv4addr = self.xml.get_widget("ipv4Address").get_text() @@ -283,7 +271,7 @@ class NetworkConfigurator: return False try: - haveNet = self.network.bringUp() + self.network.bringUp() except Exception, e: import logging log = logging.getLogger("anaconda") @@ -291,8 +279,10 @@ class NetworkConfigurator: self._handleIPError(_("Error configuring network device:"), e) return False - if not haveNet: - self._handleNetworkError(netdev.get('DEVICE')) + if self.rc != gtk.RESPONSE_OK: + gui.MessageWindow(_("Error"), + _("Error configuring network device"), + type = "ok", custom_icon="error") return False return True diff --git a/textw/netconfig_text.py b/textw/netconfig_text.py index 6a92782ee..433f5d8c3 100644 --- a/textw/netconfig_text.py +++ b/textw/netconfig_text.py @@ -266,8 +266,6 @@ class NetworkConfiguratorText: w.pop() if result: break - else: - self.anaconda.intf.messageWindow(_("Error"), _("Error configuring network device"), _("Error configuring network device %s") % netdev.get('DEVICE')) self.screen.popWindow() return INSTALL_OK |