diff options
author | nicolargo <nicolas@nicolargo.com> | 2017-03-08 21:26:27 +0100 |
---|---|---|
committer | nicolargo <nicolas@nicolargo.com> | 2017-03-08 21:26:27 +0100 |
commit | 4434a23b0f238465d2aff36857c87f4fede92595 (patch) | |
tree | 26bcfc13aabc3dac7491082630c81ae1099d542f | |
parent | 34e5c4c6993ac06a6db28ac533962691966c6337 (diff) |
Glances crash on RPi 1 running ArchLinuxARM #1046
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | glances/plugins/glances_irq.py | 10 |
2 files changed, 5 insertions, 6 deletions
@@ -17,6 +17,7 @@ Bugs corrected: * Glances --export-influxdb starts Webserver (issue #1038) * Cut mount point name if it is too long (issue #1045) * TypeError: string indices must be integers in per cpu (issue #1027) + * Glances crash on RPi 1 running ArchLinuxARM (issue #1046) Version 2.8.2 ============= diff --git a/glances/plugins/glances_irq.py b/glances/plugins/glances_irq.py index f4c7f9f9..606c7a1a 100644 --- a/glances/plugins/glances_irq.py +++ b/glances/plugins/glances_irq.py @@ -94,7 +94,6 @@ class Plugin(GlancesPlugin): if not LINUX or not self.stats or not self.args.enable_irq: return ret - if max_width is not None and max_width >= 23: irq_max_width = max_width - 14 else: @@ -179,12 +178,11 @@ class GlancesIRQ(object): FIQ: usb_fiq """ splitted_line = line.split() - # Correct issue #1007 on some conf (Raspberry Pi with Raspbian) - if len(splitted_line) < self.cpu_number + 1: - ret = 0 - else: - # sum interrupts on all CPUs + try: ret = sum(map(int, splitted_line[1:(self.cpu_number + 1)])) + except ValueError: + # Correct issue #1007 on some conf (Raspberry Pi with Raspbian) + ret = 0 return ret def __update(self): |