diff --git a/glances/plugins/glances_sensors.py b/glances/plugins/glances_sensors.py index a265c10d..df75ae37 100644 --- a/glances/plugins/glances_sensors.py +++ b/glances/plugins/glances_sensors.py @@ -315,9 +315,9 @@ class GlancesGrabSensors(object): else: sensors_current['label'] = feature.label # Sensors value, limit and unit - sensors_current['value'] = int(getattr(feature, 'current', 0)) - sensors_current['warning'] = int(getattr(feature, 'high', 0)) - sensors_current['critical'] = int(getattr(feature, 'critical', 0)) + sensors_current['value'] = int(getattr(feature, 'current', 0) if getattr(feature, 'current', 0) else 0) + sensors_current['warning'] = int(getattr(feature, 'high', 0) if getattr(feature, 'high', 0) else 0) + sensors_current['critical'] = int(getattr(feature, 'critical', 0) if getattr(feature, 'critical', 0) else 0) sensors_current['unit'] = type # Add sensor to the list ret.append(sensors_current) diff --git a/glances/plugins/sensors/glances_batpercent.py b/glances/plugins/sensors/glances_batpercent.py index a7342e12..a77c3b60 100644 --- a/glances/plugins/sensors/glances_batpercent.py +++ b/glances/plugins/sensors/glances_batpercent.py @@ -62,7 +62,7 @@ class Plugin(GlancesPlugin): # The HDD temp is displayed within the sensors plugin self.display_curse = False - @GlancesPlugin._check_decorator + # @GlancesPlugin._check_decorator @GlancesPlugin._log_result_decorator def update(self): """Update battery capacity stats using the input method.""" diff --git a/glances/plugins/sensors/glances_hddtemp.py b/glances/plugins/sensors/glances_hddtemp.py index d885797d..cf192915 100644 --- a/glances/plugins/sensors/glances_hddtemp.py +++ b/glances/plugins/sensors/glances_hddtemp.py @@ -52,7 +52,7 @@ class Plugin(GlancesPlugin): # The HDD temp is displayed within the sensors plugin self.display_curse = False - @GlancesPlugin._check_decorator + # @GlancesPlugin._check_decorator @GlancesPlugin._log_result_decorator def update(self): """Update HDD stats using the input method."""