Merge tag 'issue373' into develop

Issue #373
This commit is contained in:
Nicolargo 2014-06-21 14:38:48 +02:00
commit 04863c7dd4

View File

@ -77,13 +77,29 @@ class Plugin(GlancesPlugin):
self.reset()
if self.get_input() == 'local':
# Update stats using the standard system lib
self.stats = self.__set_type(self.glancesgrabsensors.get(), 'temperature_core')
# Update stats using the dedicated lib
try:
self.stats = self.__set_type(self.glancesgrabsensors.get(),
'temperature_core')
except:
pass
# Update HDDtemp stats
try:
hddtemp = self.__set_type(self.hddtemp_plugin.update(),
'temperature_hdd')
except:
pass
else:
# Append HDD temperature
hddtemp = self.__set_type(self.hddtemp_plugin.update(), 'temperature_hdd')
self.stats.extend(hddtemp)
# Update batteries stats
try:
batpercent = self.__set_type(self.batpercent_plugin.update(),
'battery')
except:
pass
else:
# Append Batteries %
batpercent = self.__set_type(self.batpercent_plugin.update(), 'battery')
self.stats.extend(batpercent)
elif self.get_input() == 'snmp':
# Update stats using SNMP