[sensors] allow sensor readings when there are warnings
This commit is contained in:
parent
8e71afe158
commit
2c3e14d84c
2 changed files with 5 additions and 4 deletions
|
|
@ -205,7 +205,7 @@ func Collect(req *SystemInfoRequest) (*SystemInfo, []error) {
|
|||
// also disabled on openbsd because it's not implemented by go-psutil
|
||||
if runtime.GOOS != "windows" && runtime.GOOS != "openbsd" {
|
||||
sensorReadings, err := sensors.SensorsTemperatures()
|
||||
if err == nil {
|
||||
if sensorReadings != nil && len(sensorReadings) > 0 {
|
||||
if req.CPUTempSensor != "" {
|
||||
for i := range sensorReadings {
|
||||
if sensorReadings[i].SensorKey == req.CPUTempSensor {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue