Commit 4486fb2
authored
Remove error wrapper from /sys/class/power_supply (#308)
Don't wrap the error of `ioutil.ReadDir()` so that the error return can
be tested with `os.IsNotExist()`. Fixes node_exporter log noise.
```
caller=collector.go:161 msg="collector failed" name=powersupplyclass duration_seconds=0.00079848 err="could not get power_supply class info: error obtaining power_supply class info: failed to list power supplies at \"/sys/class/power_supply\": open /sys/class/power_supply: no such file or directory"
```
Signed-off-by: Ben Kochie <superq@gmail.com>1 parent 9d2ce6b commit 4486fb2
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| |||
0 commit comments