From 5a4f574ed97b5696bc0db75772182db7775ddfbb Mon Sep 17 00:00:00 2001 From: Erwan Velu Date: Wed, 7 Aug 2013 10:46:55 +0200 Subject: [PATCH] fio2gnplot: Print specific message if cmdline parsing fails If the cmdline isn't consistent regarding the getopt, let's print a specific message to inform user about this situation instead of printing the help. Showing the help without any specific message was very confusing. --- tools/plot/fio2gnuplot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/plot/fio2gnuplot.py b/tools/plot/fio2gnuplot.py index 64b41c18..caae9e54 100755 --- a/tools/plot/fio2gnuplot.py +++ b/tools/plot/fio2gnuplot.py @@ -385,7 +385,8 @@ def main(argv): try: opts, args = getopt.getopt(argv[1:],"ghbio:d:t:p:G:m:M:") except getopt.GetoptError: - print_help() + print "Error: One of the option passed to the cmdline was supported" + print "Please fix your command line or read the help (-h option)" sys.exit(2) for opt, arg in opts: -- 2.25.1