1
0
mirror of https://github.com/gryf/wicd.git synced 2025-12-24 07:02:29 +01:00

updated hidden network ESSID retrieval code

This commit is contained in:
Adam Blackburn
2009-08-15 18:12:40 -05:00
parent 3d1a0500f0
commit 126a4e145e
2 changed files with 7 additions and 6 deletions

View File

@@ -1199,11 +1199,12 @@ class WirelessDaemon(dbus.service.Object):
# Read the essid because we need to name those hidden
# wireless networks now - but only read it if it is hidden.
if cur_network["hidden"]:
if cur_network.get("essid") in ["", "Hidden", "<hidden>", None]:
cur_network["essid"] = "<hidden>"
else:
cur_network['essid'] = self.config.get(section, 'essid')
return "100: Loaded Profile"
# check if there is an essid in the config file
# if there isn't, .get( will return None
stored_essid = self.config.get(section, 'essid')
if stored_essid:
# set the current network's ESSID to the stored one
cur_network['essid'] = stored_essid
@dbus.service.method('org.wicd.daemon.wireless')
def SaveWirelessNetworkProfile(self, id):

View File

@@ -1177,7 +1177,7 @@ class BaseWirelessInterface(BaseInterface):
except (UnicodeDecodeError, UnicodeEncodeError):
print 'Unicode problem with current network essid, ignoring!!'
return None
if ap['essid'] in ['<hidden>', "", None]:
if ap['essid'] in ['Hidden', '<hidden>', "", None]:
print 'hidden'
ap['hidden'] = True
ap['essid'] = "<hidden>"