Network.py: change network interface description name to old state. (LAN connection...
authoracid-burn <acid-burn@opendreambox.org>
Mon, 9 May 2011 09:03:39 +0000 (11:03 +0200)
committeracid-burn <acid-burn@opendreambox.org>
Mon, 9 May 2011 09:03:39 +0000 (11:03 +0200)
lib/python/Components/Network.py

index eee5a70..32b8bdb 100755 (executable)
@@ -274,16 +274,16 @@ class Network:
                name = None
                if self.isWirelessInterface(iface):
                        if iface not in self.wlan_interfaces:
                name = None
                if self.isWirelessInterface(iface):
                        if iface not in self.wlan_interfaces:
-                               self.wlan_interfaces.append(iface)
                                name = _("WLAN connection")
                                if len(self.wlan_interfaces):
                                name = _("WLAN connection")
                                if len(self.wlan_interfaces):
-                                       name += " " + str(len(self.wlan_interfaces))
+                                       name += " " + str(len(self.wlan_interfaces)+1)
+                               self.wlan_interfaces.append(iface)                                                              
                else:
                        if iface not in self.lan_interfaces:
                else:
                        if iface not in self.lan_interfaces:
-                               self.lan_interfaces.append(iface)
                                name = _("LAN connection")
                                if len(self.lan_interfaces):
                                name = _("LAN connection")
                                if len(self.lan_interfaces):
-                                       name += " " + str(len(self.lan_interfaces))
+                                       name += " " + str(len(self.lan_interfaces)+1)
+                               self.lan_interfaces.append(iface)
                return name
        
        def getFriendlyAdapterDescription(self, iface):
                return name
        
        def getFriendlyAdapterDescription(self, iface):