From 21de15e4a3d2f0cb873d32ba588deff27602fea1 Mon Sep 17 00:00:00 2001 From: abeudin Date: Fri, 4 Oct 2013 12:31:02 +0200 Subject: [PATCH] Update yunohost_monitor.py --- yunohost_monitor.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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: