From 4db82f9351466e9fe1af9f439a70f5f2c816e353 Mon Sep 17 00:00:00 2001 From: david Date: Fri, 23 Jan 2009 21:03:13 +0000 Subject: [PATCH] When ndiff gets a command-line option it doesn't understand, print just the exception message rather than the whole exception tuple. This changes ./ndiff: ('option --foo not recognized', 'foo') to ./ndiff: option --foo not recognized --- ndiff/ndiff | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ndiff/ndiff b/ndiff/ndiff index 898a5574a..e58031d2b 100755 --- a/ndiff/ndiff +++ b/ndiff/ndiff @@ -689,7 +689,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], unicode(e)) + print >> sys.stderr, u"%s: %s" % (sys.argv[0], e.msg) sys.exit(1) for o, a in opts: if o == "-h" or o == "--help":