Apparently Solaris has /proc/self/status, but it's binary and so our
Linux-centric parser couldn't handle it. The data we're getting from it is
non-critical, so just ignore the parse error and let the high-level code in
report() deal with it.
Reported by henning mueller, diagnosed by Gabriel Filion. Thanks guys!
Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
_linux_warned = 1
return {}
for line in f:
- k,v = re.split(r':\s*', line.strip(), 1)
- d[k] = v
+ # Note that on Solaris, this file exists but is binary. If that
+ # happens, this split() might not return two elements. We don't
+ # really need to care about the binary format since this output
+ # isn't used for much and report() can deal with missing entries.
+ t = re.split(r':\s*', line.strip(), 1)
+ if len(t) == 2:
+ k,v = t
+ d[k] = v
return d