mirror of
https://github.com/prometheus/node_exporter.git
synced 2024-11-23 20:36:21 +01:00
flip branches for early return
Signed-off-by: david <davidventura27@gmail.com>
This commit is contained in:
parent
75c05f3d97
commit
c2085cf8ca
@ -80,11 +80,10 @@ func NewCPUCollector(logger log.Logger) (Collector, error) {
|
||||
|
||||
isolcpus, err := sysfs.IsolatedCPUs()
|
||||
if err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
level.Debug(logger).Log("msg", "Could not open isolated file", "error", err)
|
||||
} else {
|
||||
if !os.IsNotExist(err) {
|
||||
return nil, fmt.Errorf("Unable to get isolated cpus: %w", err)
|
||||
}
|
||||
level.Debug(logger).Log("msg", "Could not open isolated file", "error", err)
|
||||
}
|
||||
|
||||
c := &cpuCollector{
|
||||
|
Loading…
Reference in New Issue
Block a user