From 0f036a5227ea19262663bbb4819b37e5a1cf6993 Mon Sep 17 00:00:00 2001 From: Florian N Date: Thu, 5 Jun 2014 22:19:11 -0400 Subject: [PATCH] Remove any elements form list if not split at 4 Interesting data in issue #23 --- main/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main/views.py b/main/views.py index f30e552..a2de518 100755 --- a/main/views.py +++ b/main/views.py @@ -310,7 +310,8 @@ def get_netstat(): pipe.close() data = [i.split(None, 4) for i in data] - + data[:] = [e for e in data if len(e) == 4] + except Exception, err: data = str(err)