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 <guss80@gmail.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #7799
This commit is contained in:
LOLi 2018-08-18 22:10:36 +02:00 committed by Tony Hutter
parent caafa436eb
commit 98bc8e0b23
1 changed files with 1 additions and 1 deletions

View File

@ -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