# Buggy code
def update(self):
    """Update sensors stats using the input method."""
    # Reset the stats
    self.reset()

    if self.get_input() == "local":
        # Update stats using the standard system lib
        self.stats = self.__set_type(self.glancesgrabsensors.get(), "temperature_core")
        # Append HDD temperature
        hddtemp = self.__set_type(self.hddtemp_plugin.update(), "temperature_hdd")
        self.stats.extend(hddtemp)
        # Append Batteries %
        batpercent = self.__set_type(self.batpercent_plugin.update(), "battery")
        self.stats.extend(batpercent)
    elif self.get_input() == "snmp":
        # Update stats using SNMP
        # No standard: http://www.net-snmp.org/wiki/index.php/Net-SNMP_and_lm-sensors_on_Ubuntu_10.04
        pass

    return self.stats


# Traceback (sensors.common.SensorsError)
Traceback (most recent call last):
File "/usr/local/bin/glances", line 9, in <module>
load_entry_point('Glances==2.0', 'console_scripts', 'glances')()
File "/usr/local/lib/python2.7/dist-packages/glances/__init__.py", line 105, in main
standalone.serve_forever()
File "/usr/local/lib/python2.7/dist-packages/glances/core/glances_standalone.py", line 54, in serve_forever
self.stats.update()
File "/usr/local/lib/python2.7/dist-packages/glances/core/glances_stats.py", line 110, in update
self.__update__(input_stats)
File "/usr/local/lib/python2.7/dist-packages/glances/core/glances_stats.py", line 101, in __update__
self._plugins[p].update()
File "/usr/local/lib/python2.7/dist-packages/glances/plugins/glances_sensors.py", line 81, in update
self.stats = self.__set_type(self.glancesgrabsensors.get(), 'temperature_core')
File "/usr/local/lib/python2.7/dist-packages/glances/plugins/glances_sensors.py", line 182, in get
self.__update__()
File "/usr/local/lib/python2.7/dist-packages/glances/plugins/glances_sensors.py", line 175, in __update__
sensors_current['value'] = int(feature.get_value())
File "/usr/local/lib/python2.7/dist-packages/sensors/api4.py", line 85, in get_value
return next(iter(self)).get_value()
File "/usr/local/lib/python2.7/dist-packages/sensors/api4.py", line 36, in get_value
_get_value(byref(self.parent.chip), self.number, byref(result))
File "/usr/local/lib/python2.7/dist-packages/sensors/common.py", line 27, in _error_check
raise SensorsError(_strerror(result), result)
sensors.common.SensorsError: Can't read

# Fixed code
def update(self):
    """Update sensors stats using the input method."""
    # Reset the stats
    self.reset()

    if self.get_input() == "local":
        # 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
            self.stats.extend(hddtemp)
        # Update batteries stats
        try:
            batpercent = self.__set_type(self.batpercent_plugin.update(), "battery")
        except:
            pass
        else:
            # Append Batteries %
            self.stats.extend(batpercent)
    elif self.get_input() == "snmp":
        # Update stats using SNMP
        # No standard: http://www.net-snmp.org/wiki/index.php/Net-SNMP_and_lm-sensors_on_Ubuntu_10.04
        pass

    return self.stats