diff --git a/yunohost_monitor.py b/yunohost_monitor.py index 05add6d3..6b18294f 100644 --- a/yunohost_monitor.py +++ b/yunohost_monitor.py @@ -133,17 +133,17 @@ def monitor_info(memory=False, cpu=False, disk=False, ifconfig=False, uptime=Fal return json.loads(s.getLoad()) elif ifconfig: - result = {} - for k, fs in enumerate(json.loads(s.getNetwork())): - 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 - return result + result = {} + for k, fs in enumerate(json.loads(s.getNetwork())): + 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 + return result elif disk: result = {}