gpodder.util: Fix FreeBSD network detection (bug 1730)
The unix_get_active_interfaces() function only partially works on FreeBSD. Wireless interfaces do not have a status of "active", but rather "associated".
This commit is contained in:
parent
2008d44b4b
commit
2e6ea217dc
|
@ -1685,7 +1685,7 @@ def osx_get_active_interfaces():
|
|||
process = subprocess.Popen(['ifconfig'], stdout=subprocess.PIPE)
|
||||
stdout, _ = process.communicate()
|
||||
for i in re.split('\n(?!\t)', stdout, re.MULTILINE):
|
||||
b = re.match('(\\w+):.*status: active$', i, re.MULTILINE | re.DOTALL)
|
||||
b = re.match('(\\w+):.*status: (active|associated)$', i, re.MULTILINE | re.DOTALL)
|
||||
if b:
|
||||
yield b.group(1)
|
||||
|
||||
|
|
Loading…
Reference in a new issue