mirror of
https://github.com/nicolargo/glances.git
synced 2026-03-13 19:39:08 -04:00
Corrtec an issue with sensors
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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."""
|
||||
|
||||
@@ -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."""
|
||||
|
||||
Reference in New Issue
Block a user