From 1dc83759d4d8f45abfc4bc4b1f4431d97f423bda 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 cd9a803a2414..010f69ec0439 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")