summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Wise <pabs3@bonedaddy.net>2016-07-28 13:25:54 +0800
committerPaul Wise <pabs3@bonedaddy.net>2016-07-28 13:25:54 +0800
commit7814f30a5ed65acd07f284bba991ca557788ee80 (patch)
tree71dfdec747c7be8124bac8eb64b96d39212ad0d9
parentb8058ad26d91022874138c40b6b680eee3325ebd (diff)
downloadiotop-7814f30a5ed65acd07f284bba991ca557788ee80.tar.gz
Only split /proc/*/status lines on the : character.
Apparently vserver kernels have some lines that don't appear to have the tab character so iotop crashes. The tab character will be stripped by the next code line. Closes: https://bugs.gentoo.org/show_bug.cgi?id=458556
-rw-r--r--iotop/data.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/iotop/data.py b/iotop/data.py
index c4e961e..d18ca9d 100644
--- a/iotop/data.py
+++ b/iotop/data.py
@@ -197,7 +197,7 @@ def parse_proc_pid_status(pid):
result_dict = {}
try:
for line in open('/proc/%d/status' % pid):
- key, value = line.split(':\t', 1)
+ key, value = line.split(':', 1)
result_dict[key] = value.strip()
except IOError:
pass # No such process