[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[PATCH] Say we are unable to configure the network interface (#467960)
- From: David Cantrell <dcantrell redhat com>
- To: anaconda-devel-list redhat com
- Cc:
- Subject: [PATCH] Say we are unable to configure the network interface (#467960)
- Date: Mon, 1 Dec 2008 12:01:10 -1000
In stage 2 when you get the 'Enable network interface' dialog, if
you select an interface that is not able to connect to a network,
we just wait and then take the user back to the Enable network
interface dialog. Before going back to the dialog, tell the user
we were unable to configure the selected interface.
---
iw/netconfig_dialog.py | 24 +++++++++++++++++-------
textw/netconfig_text.py | 2 ++
2 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/iw/netconfig_dialog.py b/iw/netconfig_dialog.py
index 5eac64d..6a8bdc7 100644
--- a/iw/netconfig_dialog.py
+++ b/iw/netconfig_dialog.py
@@ -188,10 +188,23 @@ 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)
@@ -205,9 +218,8 @@ class NetworkConfigurator:
w = gui.WaitWindow(_("Dynamic IP"),
_("Sending request for IP information "
"for %s...") % (netdev.get('DEVICE'),))
- self.network.bringUp()
+ haveNet = self.network.bringUp()
w.pop()
- self.rc = gtk.RESPONSE_OK
else:
netdev.set(('BOOTPROTO', 'static'))
ipv4addr = self.xml.get_widget("ipv4Address").get_text()
@@ -271,7 +283,7 @@ class NetworkConfigurator:
return False
try:
- self.network.bringUp()
+ haveNet = self.network.bringUp()
except Exception, e:
import logging
log = logging.getLogger("anaconda")
@@ -279,10 +291,8 @@ class NetworkConfigurator:
self._handleIPError(_("Error configuring network device:"), e)
return False
- if self.rc != gtk.RESPONSE_OK:
- gui.MessageWindow(_("Error"),
- _("Error configuring network device"),
- type = "ok", custom_icon="error")
+ if not haveNet:
+ self._handleNetworkError(netdev.get('DEVICE'))
return False
return True
diff --git a/textw/netconfig_text.py b/textw/netconfig_text.py
index 433f5d8..6a92782 100644
--- a/textw/netconfig_text.py
+++ b/textw/netconfig_text.py
@@ -266,6 +266,8 @@ 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
--
1.6.0.3
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]