arcstat: fix -p option

When the -p option is used, a list of floats is passed to sep.join(),
which expects strings. Fix this by converting each value to a string.

Reviewed-by: Richard Elling <Richard.Elling@RichardElling.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Roberto Ricci <ricci@disroot.org>
Closes #12916 
Closes #13767
This commit is contained in:
r-ricci 2022-08-12 22:21:52 +01:00 committed by GitHub
parent fbc210fab2
commit e713b69e51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -271,7 +271,7 @@ def print_values():
if pretty_print: if pretty_print:
fmt = lambda col: prettynum(cols[col][0], cols[col][1], v[col]) fmt = lambda col: prettynum(cols[col][0], cols[col][1], v[col])
else: else:
fmt = lambda col: v[col] fmt = lambda col: str(v[col])
sys.stdout.write(sep.join(fmt(col) for col in hdr)) sys.stdout.write(sep.join(fmt(col) for col in hdr))
sys.stdout.write("\n") sys.stdout.write("\n")