Skip to content

Commit

Permalink
Fix #157, remove host.Warnings check (#159)
Browse files Browse the repository at this point in the history
Warnings were moved to gopsutil internal:
shirou/gopsutil@v3.22.9...v3.22.10
  • Loading branch information
mrusme committed Dec 1, 2022
1 parent 8834a6b commit a2cf7c4
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions health.go
Expand Up @@ -323,12 +323,7 @@ func GetOSInfo(ctx context.Context, addr string) OSInfo {
}
osInfo.Info.KernelVersion = kr

osInfo.Sensors, err = host.SensorsTemperaturesWithContext(ctx)
if err != nil {
if _, isWarningErr := err.(*host.Warnings); !isWarningErr {
osInfo.Error = err.Error()
}
}
osInfo.Sensors, _ = host.SensorsTemperaturesWithContext(ctx)

return osInfo
}
Expand Down

0 comments on commit a2cf7c4

Please sign in to comment.