summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRiccardo Magliocchetti <riccardo.magliocchetti@gmail.com>2012-08-17 18:02:12 +0200
committerArmin Kuster <akuster808@gmail.com>2019-05-03 18:29:33 -0700
commitff7cecc8bd22becdb1dad16bf61ba8ce03960882 (patch)
treee3e483f9333874be9a2ed3f252bb146ab7329c6e
parent879b590fe810a543af4cb4ec2c593c448a22a56c (diff)
downloadopenembedded-core-contrib-ff7cecc8bd22becdb1dad16bf61ba8ce03960882.tar.gz
pybootchartgui: be more tolerant when parsing proc_meminfo.log
waasdorp reports in bug #40 that we are raising an exception if a line in proc_meminfo.log is not well formed. He is right because we were trying to access matches of a regexp that did not match. That is obviously silly but it is also silly to stop processing all the data if a line is wrong, even a line that we are not interested in it. Instead ignore the line and skip the sample if it is not valid. Example of broken line: Shmem: While at it remove an unused variable Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--scripts/pybootchartgui/pybootchartgui/parsing.py2
1 files changed, 0 insertions, 2 deletions
diff --git a/scripts/pybootchartgui/pybootchartgui/parsing.py b/scripts/pybootchartgui/pybootchartgui/parsing.py
index bcfb2da569..b7b2546ff1 100644
--- a/scripts/pybootchartgui/pybootchartgui/parsing.py
+++ b/scripts/pybootchartgui/pybootchartgui/parsing.py
@@ -513,8 +513,6 @@ def _parse_proc_meminfo_log(file):
Parse file for global memory statistics.
The format of relevant lines should be: ^key: value( unit)?
"""
- used_values = ('MemTotal', 'MemFree', 'Buffers', 'Cached', 'SwapTotal', 'SwapFree',)
-
mem_stats = []
meminfo_re = re.compile(r'([^ \t:]+):\s*(\d+).*')