mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
Always associate network interface's name to local_ip
This commit is contained in:
parent
1d85e6e7bc
commit
ed23a131df
1 changed files with 3 additions and 6 deletions
|
@ -161,12 +161,9 @@ def monitor_network(units=None, human_readable=False):
|
|||
for name, addrs in devices.items():
|
||||
if name == 'lo':
|
||||
continue
|
||||
if len(devices) == 2:
|
||||
l_ip = _extract_inet(addrs)
|
||||
else:
|
||||
if not isinstance(l_ip, dict):
|
||||
l_ip = {}
|
||||
l_ip[name] = _extract_inet(addrs)
|
||||
if not isinstance(l_ip, dict):
|
||||
l_ip = {}
|
||||
l_ip[name] = _extract_inet(addrs)
|
||||
|
||||
gateway = 'unknown'
|
||||
output = subprocess.check_output('ip route show'.split())
|
||||
|
|
Loading…
Add table
Reference in a new issue