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:
parent
caafa436eb
commit
98bc8e0b23
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue