Skip to content

Commit

Permalink
flip branches for early return
Browse files Browse the repository at this point in the history
Signed-off-by: david <davidventura27@gmail.com>
  • Loading branch information
DavidVentura committed Jul 26, 2022
1 parent 75c05f3 commit c2085cf
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions collector/cpu_linux.go
Expand Up @@ -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{
Expand Down

0 comments on commit c2085cf

Please sign in to comment.