mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2024-12-25 07:09:04 +01:00
Add missing error check in InfiniBandPerfQueryMetric
This commit is contained in:
parent
8c744617be
commit
cc86fc00a0
@ -50,6 +50,9 @@ func (m *InfinibandPerfQueryCollector) Init(config json.RawMessage) error {
|
||||
m.lids = make(map[string]map[string]string)
|
||||
p := fmt.Sprintf("%s/*/ports/*/lid", string(IB_BASEPATH))
|
||||
files, err := filepath.Glob(p)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
for _, f := range files {
|
||||
lid, err := ioutil.ReadFile(f)
|
||||
if err == nil {
|
||||
|
Loading…
Reference in New Issue
Block a user