From e25af60135ef62fca82147f64a584d4c781b5356 Mon Sep 17 00:00:00 2001 From: Andreas Monzner Date: Thu, 3 Jul 2008 17:40:33 +0000 Subject: [PATCH] fix deathscreen when opening wlan network list (ssid list) and the currently used ssid is not found --- lib/python/Screens/NetworkSetup.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/python/Screens/NetworkSetup.py b/lib/python/Screens/NetworkSetup.py index 8bffaf7..a3f39d6 100644 --- a/lib/python/Screens/NetworkSetup.py +++ b/lib/python/Screens/NetworkSetup.py @@ -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)) -- 2.7.4