From c2199bc029f29eb88c73d10002855595c5c0d383 Mon Sep 17 00:00:00 2001 From: Carsten Grohmann Date: Sat, 2 Nov 2019 21:19:04 +0100 Subject: [PATCH] Ignore elements w/o values in SVG generation If the OOM format has changed and the regular expression doesn't match, the values are None (js: undefined). Ignore such values now. --- OOMAnalyser.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OOMAnalyser.py b/OOMAnalyser.py index 411d6c4..ef7f37c 100644 --- a/OOMAnalyser.py +++ b/OOMAnalyser.py @@ -869,6 +869,10 @@ Killed process 6576 (java) total-vm:33914892kB, anon-rss:20629004kB, file-rss:0k nr_processed_elements = 0 for title, length in elements: + # length is None/undefined is the regular expression doesn't find any values + if not length: + continue + rect_len = int(100 * length / sum_all_elements) * length_factor if not rect_len: