Print warnings when failing to get sensors
This commit is contained in:
parent
3679cc21ab
commit
920bcb06dc
1 changed files with 6 additions and 0 deletions
|
|
@ -86,6 +86,12 @@ func cliSensorsPrint() int {
|
|||
tempSensors, err := sensors.SensorsTemperatures()
|
||||
if err != nil {
|
||||
fmt.Printf("Failed to retrieve list of sensors: %v\n", err)
|
||||
if warns, ok := err.(*sensors.Warnings); ok {
|
||||
for _, w := range warns.List {
|
||||
fmt.Printf(" - %v\n", w)
|
||||
}
|
||||
}
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue