mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2026-06-30 15:20:38 +02:00
Check scanner error and remove %w/%v formats
This commit is contained in:
@@ -165,6 +165,9 @@ func (m *IpmiCollector) readIpmiTool(output chan lp.CCMessage) error {
|
||||
y.AddMeta("unit", unit)
|
||||
output <- y
|
||||
}
|
||||
if err := scanner.Err(); err != nil {
|
||||
return fmt.Errorf("failed to scan output of command: %s", err.Error())
|
||||
}
|
||||
|
||||
// Wait for command end
|
||||
if err := command.Wait(); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user