Closed dcbw closed 1 year ago
Maybe we should inverse this, all errors are fatal unless they're in a list of allowed non-fatal errors.
Maybe we should inverse this, all errors are fatal unless they're in a list of allowed non-fatal errors.
@SuperQ that's effectively what the code is already doing (and was doing before); but perhaps my function name is not as clear. I can reverse the meaning if you'd like.
@SuperQ flipped meaning to canIgnoreError()
and updated the docstring to better explain. PTAL thanks!
https://github.com/prometheus/procfs/pull/483 introduced a bug that terminates attribute reading when the returned error is
syscall.Errno
, which is whatutil.SysReadFile()
will typically return. Handle that case specifically.While doing that pull the error checking into
ParseNetClassAttribute()
for clarity and to allow external callers to handle errors correctly.@SuperQ @discordianfish