fix deathscreen when opening wlan network list (ssid list) and the currently
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Thu, 3 Jul 2008 17:40:33 +0000 (17:40 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Thu, 3 Jul 2008 17:40:33 +0000 (17:40 +0000)
used ssid is not found

lib/python/Screens/NetworkSetup.py

index 8bffaf7..a3f39d6 100644 (file)
@@ -172,7 +172,10 @@ class AdapterSetup(Screen, ConfigListScreen):
                                        self.nwlist.append("No Networks found")
                                
                        wsconfig = self.ws.loadConfig()
-                       config.plugins.wlan.essid = NoSave(ConfigSelection(self.nwlist, default = self.essid or wsconfig['ssid'] ))
+                       default = self.essid or wsconfig['ssid']
+                       if default not in self.nwlist:
+                               self.nwlist.append(default)
+                       config.plugins.wlan.essid = NoSave(ConfigSelection(self.nwlist, default = default ))
                        config.plugins.wlan.encryption.enabled = NoSave(ConfigYesNo(default = wsconfig['encryption'] ))
                        config.plugins.wlan.encryption.type = NoSave(ConfigSelection(list, default = wsconfig['encryption_type'] ))
                        config.plugins.wlan.encryption.psk = NoSave(ConfigText(default = wsconfig['key'], fixed_size = False,visible_width = 30))