From 4dafdd60b2a7ec0f08412b530f41b38ccf22fb00 Mon Sep 17 00:00:00 2001 From: Alessio Sergi Date: Mon, 12 Aug 2013 16:33:33 +0200 Subject: [PATCH] Fix Glances 1.7 to work on FreeBSD and OS X (issue #274) --- glances/glances.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/glances/glances.py b/glances/glances.py index 562e8cda..cc56927c 100644 --- a/glances/glances.py +++ b/glances/glances.py @@ -2373,8 +2373,9 @@ class glancesScreen: cpu['user'], proclist) logs.add(self.__getCpuAlert(cpu['system'], stat = "SYSTEM"), "CPU system", cpu['system'], proclist) - logs.add(self.__getCpuAlert(cpu['iowait'], stat = "IOWAIT"), "CPU IOwait", - cpu['iowait'], proclist) + if 'iowait' in cpu: + logs.add(self.__getCpuAlert(cpu['iowait'], stat = "IOWAIT"), "CPU IOwait", + cpu['iowait'], proclist) # Display per-CPU stats if screen_y > self.cpu_y + 5 and tag_percpu: -- GitLab