From: Erwan Velu Date: Wed, 7 Aug 2013 08:46:55 +0000 (+0200) Subject: fio2gnplot: Print specific message if cmdline parsing fails X-Git-Tag: fio-2.1.3~24 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=5a4f574ed97b5696bc0db75772182db7775ddfbb;p=fio.git 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. --- 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: