summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicolargo <nicolas@nicolargo.com>2017-03-09 21:23:35 +0100
committernicolargo <nicolas@nicolargo.com>2017-03-09 21:23:35 +0100
commit6c6d5797de1540dc62010be289cfb36750addb0b (patch)
treed534f7592e453e87179d4d64c720bfd37574121f
parent32bd04088f153c9d5ac759de62451c3146a16fe0 (diff)
Correct test issue on Travis CI
-rw-r--r--glances/plugins/glances_batpercent.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/glances/plugins/glances_batpercent.py b/glances/plugins/glances_batpercent.py
index dcc6bd51..0891e8a6 100644
--- a/glances/plugins/glances_batpercent.py
+++ b/glances/plugins/glances_batpercent.py
@@ -111,7 +111,7 @@ class GlancesGrabBat(object):
'label': 'Battery',
'value': self.battery_percent,
'unit': '%'}]
- elif psutil_tag:
+ elif psutil_tag and hasattr(self.bat.sensors_battery(), 'percent'):
# Use the PSUtil 5.2.0 or higher lib to grab the stats
# Give directly the battery percent
self.bat_list = [{