diff options
author | Caleb Bassi <calebjbassi@gmail.com> | 2019-02-03 20:11:28 -0800 |
---|---|---|
committer | Caleb Bassi <calebjbassi@gmail.com> | 2019-02-03 20:26:57 -0800 |
commit | dbf25cdd857e3b71a26d9fc7bbd29354068da791 (patch) | |
tree | 50ce73de588a37551bbfe1f99f108824a12cee9f | |
parent | 95b6665026a1cc58cd834acf5678d1574987cd0e (diff) |
Fix temperatures not showing (#101, #103)
Sometimes a temperature sensor file in `/sys/class/hwmon/hwmon*/temp*_*` will return 'ENETDOWN: Network is down' when being read for some reason, which gopsutil propogates up to gotop. gopsutil still returns a slice of valid temperatures when it errors, so we can render those instead of ignoring the return value.
-rw-r--r-- | src/widgets/temp_other.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/widgets/temp_other.go b/src/widgets/temp_other.go index 0e5de36..db30de4 100644 --- a/src/widgets/temp_other.go +++ b/src/widgets/temp_other.go @@ -13,8 +13,7 @@ import ( func (self *Temp) update() { sensors, err := psHost.SensorsTemperatures() if err != nil { - log.Printf("failed to get sensors from gopsutil: %v", err) - return + log.Printf("error recieved from gopsutil: %v", err) } for _, sensor := range sensors { // only sensors with input in their name are giving us live temp info |