Skip to content

Commit

Permalink
arcstat: fix -p option
Browse files Browse the repository at this point in the history
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 openzfs#12916 
Closes openzfs#13767
  • Loading branch information
r-ricci authored and beren12 committed Sep 19, 2022
1 parent 7c920e4 commit 69fa56d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/arcstat.in
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def print_values():
if pretty_print:
fmt = lambda col: prettynum(cols[col][0], cols[col][1], v[col])
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("\n")
Expand Down

0 comments on commit 69fa56d

Please sign in to comment.