mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2024-11-10 04:27:25 +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