From 7c92614f72abdec36b509c1dfd46646a7a41f541 Mon Sep 17 00:00:00 2001 From: Florian N Date: Mon, 10 Feb 2014 18:12:42 -0500 Subject: [PATCH] small bug in traffic gen --- main/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/views.py b/main/views.py index e1925a5..2582faa 100755 --- a/main/views.py +++ b/main/views.py @@ -132,8 +132,8 @@ def get_traffic(request): pipe = os.popen("cat /proc/net/dev |" + "grep " + request + "| awk '{print $2, $10}'") data = pipe.read().strip().split(':',1)[-1] pipe.close() - else: - data = data.split() + + data = data.split() traffic_in = int(data[0]) traffic_out = int(data[1])