From 24476712fc65e407db4589949e2a4146737a736e Mon Sep 17 00:00:00 2001 From: nicolargo Date: Tue, 15 May 2018 22:07:45 +0200 Subject: [PATCH] Crashes when influxdb option set #1260 --- NEWS | 1 + glances/plugins/glances_batpercent.py | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 8fc5fcc0..a5411f51 100644 --- a/NEWS +++ b/NEWS @@ -57,6 +57,7 @@ Bugs corrected: * Stats updated during export (thread issue) #1250 * Glances --browser crashed when more than 40 glances servers on screen 78x45 #1256 * OSX - Python 3 and empty percent and res #1251 + * Crashes when influxdb option set #1260 Backward-incompatible changes: diff --git a/glances/plugins/glances_batpercent.py b/glances/plugins/glances_batpercent.py index 6108a9aa..ed3cce51 100644 --- a/glances/plugins/glances_batpercent.py +++ b/glances/plugins/glances_batpercent.py @@ -38,9 +38,8 @@ except ImportError: psutil_tag = True try: psutil.sensors_battery() -except (OSError, AttributeError) as e: - logger.debug("Cannot grab battery status. Platform not supported.") - logger.error(e) +except Exception as e: + logger.error("Cannot grab battery status {}.".format(e)) psutil_tag = False -- GitLab