From 4ec93df7d6b613c29f297ac31154e1be3a665d16 Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Fri, 15 Jan 2010 13:48:37 +0000 Subject: [PATCH] fix crashers rendering with no kernel boot message state --- bootchartd | 1 + pybootchartgui/parsing.py | 1 + pybootchartgui/process_tree.py | 5 ++++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bootchartd b/bootchartd index b2ff8f7..1612cea 100644 --- a/bootchartd +++ b/bootchartd @@ -107,6 +107,7 @@ wait_boot() # Give the exit process some time to start stopinitrd=$( pidof stopinitrd ) if [ -n "$stopinitrd" ] ; then + umount proc # move initrd logs somewhere safe (?) mv $LOG_DIR/* /dev/shm/ wait diff --git a/pybootchartgui/parsing.py b/pybootchartgui/parsing.py index e2c6570..4341c4b 100644 --- a/pybootchartgui/parsing.py +++ b/pybootchartgui/parsing.py @@ -363,6 +363,7 @@ def __init__(self): self.disk_stats = None self.ps_stats = None self.cpu_stats = None + self.kernel = None def valid(self): return self.headers != None and self.disk_stats != None and self.ps_stats != None and self.cpu_stats != None diff --git a/pybootchartgui/process_tree.py b/pybootchartgui/process_tree.py index 751a54b..0c0054d 100644 --- a/pybootchartgui/process_tree.py +++ b/pybootchartgui/process_tree.py @@ -43,7 +43,10 @@ def __init__(self, writer, kernel, psstats, monitoredApp, prune, idle, for_testi # tack the kernel data onto psstats for now ... # self.psstats = psstats - process_list = kernel + psstats.process_list + if kernel is None: + process_list = psstats.process_list + else: + process_list = kernel + psstats.process_list self.process_list = sorted(process_list, key = lambda p: p.pid) self.sample_period = psstats.sample_period