From 67c34404f2d4fe98a379befd3f50e73bfe17ef24 Mon Sep 17 00:00:00 2001 From: david Date: Wed, 13 May 2009 00:39:40 +0000 Subject: [PATCH] Print the "Try -h for help" message when there's an option error in addition to the error message getopt prints. --- ndiff/ndiff | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ndiff/ndiff b/ndiff/ndiff index af86c0288..1daaedcc8 100755 --- a/ndiff/ndiff +++ b/ndiff/ndiff @@ -994,8 +994,7 @@ def main(): try: opts, input_filenames = getopt.gnu_getopt(sys.argv[1:], "hv", ["help", "text", "verbose", "xml"]) except getopt.GetoptError, e: - print >> sys.stderr, u"%s: %s" % (sys.argv[0], e.msg) - sys.exit(1) + usage_error(u"%s: %s" % (sys.argv[0], e.msg)) for o, a in opts: if o == "-h" or o == "--help": usage()