This commit is contained in:
Rich
2021-09-01 10:34:11 +01:00
parent 9933954deb
commit aadd367076
4 changed files with 17 additions and 13 deletions

View File

@@ -76,6 +76,8 @@ def parse_iwlist(iwlist_output, current_sid):
if line.find("ESSID:") != -1:
if line.partition("ESSID:")[2].strip('"') != "":
cell["SSID"] = line.partition("ESSID:")[2].strip('"')
else:
cell["SSID"] = "!***!"
if cell["SSID"] == current_sid:
cell["Connected"] = "Yes"
else:
@@ -92,6 +94,8 @@ def parse_iwlist(iwlist_output, current_sid):
except:
cells = []
cells = [cell for cell in cells if cell["SSID"] != "!***!"]
return cells