mirror of
https://github.com/glanceapp/glance.git
synced 2025-06-21 18:31:24 +02:00
Print warnings when failing to get sensors
This commit is contained in:
parent
3679cc21ab
commit
920bcb06dc
@ -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…
x
Reference in New Issue
Block a user