From 533779f5f2d91e8dc3fc8ac8184fc858d2e6428a Mon Sep 17 00:00:00 2001 From: r-ricci Date: Fri, 12 Aug 2022 22:21:52 +0100 Subject: [PATCH] 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 Reviewed-by: Brian Behlendorf Signed-off-by: Roberto Ricci Closes #12916 Closes #13767 --- cmd/arcstat/arcstat.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/arcstat/arcstat.in b/cmd/arcstat/arcstat.in index 9e7c52a6c7..425e52d1f5 100755 --- a/cmd/arcstat/arcstat.in +++ b/cmd/arcstat/arcstat.in @@ -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")