diff options
author | xxxserxxx <60757196+xxxserxxx@users.noreply.github.com> | 2022-05-13 13:30:52 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-13 13:30:52 -0500 |
commit | b0fd8ac8cd8ba8f6351fd1ef798ebb9db80fc42a (patch) | |
tree | 2686dc3343442177b5858e7f933aba4de6092996 | |
parent | d3fc311d68f2c3f4c0a8e2e0a95a0dbce7594669 (diff) | |
parent | 7cb35f7f7822d828fcd2c702eeeb4708837c2048 (diff) |
Merge pull request #219 from aztecrabbit/fix-issue-16
Fix temperature widget not working
-rw-r--r-- | devices/temp_nix.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/devices/temp_nix.go b/devices/temp_nix.go index 0015e1d..488e16f 100644 --- a/devices/temp_nix.go +++ b/devices/temp_nix.go @@ -1,3 +1,4 @@ +//go:build linux || darwin // +build linux darwin package devices @@ -15,7 +16,11 @@ func init() { func getTemps(temps map[string]int) map[string]error { sensors, err := host.SensorsTemperatures() if err != nil { - return map[string]error{"gopsutil host": err} + if _, ok := err.(*host.Warnings); ok { + // ignore warnings + } else { + return map[string]error{"gopsutil host": err} + } } for _, sensor := range sensors { label := sensorMap[sensor.SensorKey] |