PATCH:(resend)Fix bugs in netconfig_dialog.py

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

 



Hi,

I found some bugs in netconfig_dialog.py

- fix typo (sef to set)
- fix passed argument for _handleIPMissing
- remove some lines to enable CDIR

thank you
diff -u -r1.13 netconfig_dialog.py
--- iw/netconfig_dialog.py      25 Jun 2007 14:16:13 -0000      1.13
+++ iw/netconfig_dialog.py      3 Jul 2007 11:03:57 -0000
@@ -188,22 +188,12 @@
                 network.sanityCheckIPString(ipv4addr)
                 netdev.set(('ipaddr', ipv4addr))
             except network.IPMissing, msg:
-                self._handleIPMissing(_("IP Address"), msg)
+                self._handleIPMissing(_("IP Address"))
                 return
             except network.IPError, msg:
                 self._handleIPError(_("IP Address"), msg)
                 return

-            try:
-                network.sanityCheckIPString(ipv4nm)
-                netdev.set(('netmask', ipv4nm))
-            except network.IPMissing, msg:
-                self._handleIPMissing(_("Netmask"), msg)
-                return
-            except network.IPError, msg:
-                self._handleIPError(_("Netmask"), msg)
-                return
-
             if ipv4nm.find('.') == -1:
                 # user provided a CIDR prefix
                 try:
@@ -213,17 +203,17 @@
                         return
                     else:
                         ipv4nm = isys.prefix2netmask(int(ipv4nm))
-                        netdev.sef(('netmask', ipv4nm))
+                        netdev.set(('netmask', ipv4nm))
                 except:
-                    self._handleIPMissing(_("IPv4 Network Mask"), msg)
+                    self._handleIPMissing(_("IPv4 Network Mask"))
                     return
             else:
                 # user provided a dotted-quad netmask
                 try:
                     network.sanityCheckIPString(ipv4nm)
-                    netdev.sef(('netmask', ipv4nm))
+                    netdev.set(('netmask', ipv4nm))
                 except network.IPMissing, msg:
-                    self._handleIPMissing(_("IPv4 Network Mask"), msg)
+                    self._handleIPMissing(_("IPv4 Network Mask"))
                     return
                 except network.IPError, msg:
                     self._handleIPError(_("IPv4 Network Mask"), msg)
@@ -232,7 +222,7 @@
             try:
                 network.sanityCheckIPString(gateway)
             except network.IPMissing, msg:
-                self._handleIPMissing(_("Gateway"), msg)
+                self._handleIPMissing(_("Gateway"))
                 return
             except network.IPError, msg:
                 self._handleIPError(_("Gateway"), msg)


[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