fixed crash on empty wi-fi list
parent
b05b3832ec
commit
58fb0a63b9
|
@ -11,9 +11,13 @@ class NetworkManagerConnector:
|
|||
capture_output=True, text=True)
|
||||
|
||||
if parse:
|
||||
# if no output
|
||||
if subp.stdout.strip() == "":
|
||||
return []
|
||||
|
||||
return [
|
||||
[field.replace("\\:", ":")
|
||||
for field in re.split(r"(?<!\\):", line)]
|
||||
for field in re.split(r"(?<!\\):", line)]
|
||||
for line in subp.stdout.strip().split("\n")]
|
||||
|
||||
return subp.stdout
|
||||
|
|
Loading…
Reference in New Issue