aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugeni Dodonov <eugeni@mandriva.com>2009-09-23 14:42:20 -0300
committerEugeni Dodonov <eugeni@mandriva.com>2009-09-23 14:42:20 -0300
commit4fca00f85539a68f193acc2069d6e2d7202eb9e8 (patch)
tree07a5f22a47f1dd188d9206439019229a501de5c5
parentd43dece1c1fbc27e7f7067ccb7f30a6c892d87ee (diff)
downloadnet_monitor-4fca00f85539a68f193acc2069d6e2d7202eb9e8.tar
net_monitor-4fca00f85539a68f193acc2069d6e2d7202eb9e8.tar.gz
net_monitor-4fca00f85539a68f193acc2069d6e2d7202eb9e8.tar.bz2
net_monitor-4fca00f85539a68f193acc2069d6e2d7202eb9e8.tar.xz
net_monitor-4fca00f85539a68f193acc2069d6e2d7202eb9e8.zip
sorting interfaces
-rwxr-xr-xnet_monitor.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/net_monitor.py b/net_monitor.py
index e80fc31..7360f5f 100755
--- a/net_monitor.py
+++ b/net_monitor.py
@@ -272,7 +272,10 @@ class Monitor:
self.ifaces = readnet()
self.enabled_ifaces = []
- for iface in self.ifaces:
+ sorted_ifaces = self.ifaces.keys()
+ sorted_ifaces.sort()
+
+ for iface in sorted_ifaces:
data_in, data_out = get_traffic(iface)
self.ifaces[iface] = {'data_in': 0,
'data_out': 0,