Skip to content

Commit

Permalink
Merge pull request #69 from chalios/main
Browse files Browse the repository at this point in the history
Adapting Wifi parsing for different nmcli versions
  • Loading branch information
ushiboy authored Sep 15, 2024
2 parents 55b8e5e + 77e4207 commit 28e26b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nmcli/data/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def parse(cls, text: str) -> DeviceWifi:
t = text.replace("\\:", "\uFFFE").replace(
":", "\uFFFF").replace("\uFFFE", ":")
m = re.search(
r'^(\*|\s)\uFFFF(.*)\uFFFF(.*)\uFFFF(.*)\uFFFF(\d+)\uFFFF(\d+)\sMHz\uFFFF(\d+)\sMbit\/s\uFFFF(\d+)\uFFFF(.*)$', t)
r'^(\*|\s)\uFFFF(.*)\uFFFF(.*)\uFFFF(.*)\uFFFF(\d+)\uFFFF(\d+)\sMHz\uFFFF(\d+)\s(?:Mb|Mbit)\/s\uFFFF(\d+)\uFFFF(.*)$', t)
if m:
in_use, ssid, bssid, mode, chan, freq, rate, signal, security = m.groups()
return DeviceWifi(in_use == '*', ssid, bssid, mode,
Expand Down

0 comments on commit 28e26b9

Please sign in to comment.