summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLOLi <[email protected]>2018-08-18 22:10:36 +0200
committerBrian Behlendorf <[email protected]>2018-08-18 13:10:36 -0700
commit1f87313ac830970088389a6d6e68fa3ce8194aff (patch)
tree8c5945a0abb2f9115f9de4174fa003d144b2f0c8
parent802715b74a23a58d66028699a99eb141c85b7447 (diff)
Fix arcstat.py handling of unsupported options
This change allows the arcstat.py script to handle unsupported options gracefully and print both error and usage messages when one such option is provided. Reviewed-by: Giuseppe Di Natale <[email protected]> Reviewed-by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: loli10K <[email protected]> Closes #7799
-rwxr-xr-xcmd/arcstat/arcstat.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/arcstat/arcstat.py b/cmd/arcstat/arcstat.py
index 85c83ccc4..b52a8c294 100755
--- a/cmd/arcstat/arcstat.py
+++ b/cmd/arcstat/arcstat.py
@@ -285,7 +285,7 @@ def init():
]
)
except getopt.error as msg:
- sys.stderr.write(msg)
+ sys.stderr.write("Error: %s\n" % str(msg))
usage()
opts = None