Regular expression for getting essid fails sometimes

Bug #1042290 reported by Roberto on 2012-08-27
This bug affects 1 person
Affects Status Importance Assigned to Milestone
David Paleino

Bug Description

I've found that Wicd fails to parse the essid in some systems. Wifi driver is marvell sd8686, works with wpa_supplicant -D wext. This is the regular expression used by wicd to get the essid, taken from latest source code revision, in file

essid_pattern = re.compile('.*ESSID:"(.*?)".*\n', _re_mode)

For some reason my system reports the essid with some trailing numbers that are not part of the essid, like this:

iwlist eth0 scanning
eth0 Scan completed :
          Cell 01 - Address: XX:XX:XX:XX:XX:XX
          Cell 02 - Address: XX:XX:XX:XX:XX:XX
                    ESSID:"MyHomeWifi" [2]
          Cell 03 - Address: XX:XX:XX:XX:XX:XX
                    ESSID:"WLAN_2222" [3]

Wicd seems to be confused with the trailing numbers and will create an invalid wpa_supplicant config. I've verified that this regular expression works for this particular case (as a test, not a real fix because it may fail for others):

essid_pattern = re.compile('.*ESSID:"(.*?)".*\n', _re_mode)

Related branches

Roberto (rgs) wrote :

Sorry, I've noticed that I've pasted the same regular expression twice, this is the original:

essid_pattern = re.compile('.*ESSID:"?(.*?)"?\s*\n', _re_mode)

and this is the one that works in my case:

essid_pattern = re.compile('.*ESSID:"(.*?)".*\n', _re_mode)

PCManiac (pcmaniacpt) wrote :


Kindly check my bug report which was fixed by the author just now @irc:

Best regards

David Paleino (dpaleino) on 2012-09-08
Changed in wicd:
milestone: none → 1.7.3
assignee: nobody → David Paleino (dpaleino)
importance: Undecided → High
status: New → Triaged
David Paleino (dpaleino) wrote :
Changed in wicd:
status: Triaged → Fix Committed
Roberto (rgs) wrote :

Thank you.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers