PATCH: handleIPError and need to import logging

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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:


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux