Do not display anything if no battery are detected

This commit is contained in:
Nicolargo 2016-09-02 14:33:38 +02:00
parent 407dc6b65b
commit 97a9365bf8

View File

@ -183,6 +183,9 @@ class Plugin(GlancesPlugin):
ret.append(self.curse_add_line(msg, "TITLE"))
for i in self.stats:
# Do not display anything if no battery are detected
if (i['type'] == 'battery' and i['value'] == []):
continue
# New line
ret.append(self.curse_new_line())
# Alias for the lable name ?