From 8125fd6104ce6aa6c02007f1197ae2ca2c6d04b9 Mon Sep 17 00:00:00 2001 From: Joanna Rutkowska Date: Wed, 14 Sep 2011 20:04:33 +0200 Subject: [PATCH] Ugly workaround for ticket #321 --- qubesmanager/main.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/qubesmanager/main.py b/qubesmanager/main.py index 6f68e11..7443777 100755 --- a/qubesmanager/main.py +++ b/qubesmanager/main.py @@ -218,7 +218,12 @@ class LoadChartWidget (QWidget): def update_load (self, vm, cpu_load): self.load = cpu_load if vm.last_power_state else 0 - assert self.load >= 0 and self.load <= 100, "load = {0}".format(self.load) + assert self.load >= 0, "load = {0}".format(self.load) + # assert self.load >= 0 and self.load <= 100, "load = {0}".format(self.load) + if self.load > 100: + # FIXME: This is an ugly workaround :/ + self.load = 100 + self.load_history.append (self.load) self.repaint()