[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
PATCH: handleIPError and need to import logging
- From: HARA Hiroshi <hhara miraclelinux com>
- To: Discussion of Development and Customization of the Red Hat Linux Installer <anaconda-devel-list redhat com>
- Subject: PATCH: handleIPError and need to import logging
- Date: Thu, 21 Jun 2007 21:01:31 +0900
Hi,
Here is the patch for "Add iSCSI target" error handling.
(anaconda does not handle Some incorrect situation well)
Would you review my patch, please?
thank you.
diff -u -r1.8 netconfig_dialog.py
--- iw/netconfig_dialog.py 30 May 2007 18:37:40 -0000
+++ iw/netconfig_dialog.py 21 Jun 2007 11:45:03 -0000
@@ -177,6 +177,9 @@
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 @@
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 @@
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:
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]