NetworkWizard/NetworkWizard.py: * fix automatic interface selection if only one netwo...
authoracid-burn <acid-burn@opendreambox.org>
Thu, 11 Feb 2010 13:15:33 +0000 (14:15 +0100)
committeracid-burn <acid-burn@opendreambox.org>
Thu, 11 Feb 2010 13:15:33 +0000 (14:15 +0100)
lib/python/Plugins/SystemPlugins/NetworkWizard/NetworkWizard.py

index 150dba9debc1ffd419a716ff5ee11afb770bc7bf..a8b34acd8aaa172cc8de8a3f9f493ec48d231917 100755 (executable)
@@ -104,6 +104,9 @@ class NetworkWizard(WizardLanguage, Rc):
                self.rescanTimer.stop()
                self.Adapterlist = iNetwork.getAdapterList()
                self.InstalledInterfaceCount = len(self.Adapterlist)
+               if self.Adapterlist is not None:
+                       if self.InstalledInterfaceCount == 1 and self.selectedInterface is None:
+                                       self.selectedInterface = self.Adapterlist[0]
                self.originalAth0State = iNetwork.getAdapterAttribute('ath0', 'up')
                self.originalEth0State = iNetwork.getAdapterAttribute('eth0', 'up')
                self.originalWlan0State = iNetwork.getAdapterAttribute('wlan0', 'up')