diff --git a/yunohost_monitor.py b/yunohost_monitor.py index e3ac18e6..ab3484f6 100644 --- a/yunohost_monitor.py +++ b/yunohost_monitor.py @@ -136,14 +136,14 @@ def monitor_info(memory=False, cpu=False, disk=False, ifconfig=False, uptime=Fal # TODO: c'est pas ifconfig ça ;) result = {} for k, fs in enumerate(json.loads(s.getNetwork())): - interface = fs['interface_name'] + interface = fs['interface_name'] if interface != "lo": - ip = get_ip_address(str(interface)) - del fs['interface_name'] - result[ip] = fs - else: - del fs['interface_name'] - result[interface] = fs + ip = get_ip_address(str(interface)) + del fs['interface_name'] + result[ip] = fs + else: + del fs['interface_name'] + result[interface] = fs return result elif disk: