Incorrect commandline arguments produce a python backtrace dump.
eg.
synopsis -p [no option]
synopsis --p
synopsis --parser
Sample output, currently:
$ ./synopsis -p
Traceback (most recent call last):
File "./synopsis", line 189, in ?
main()
File "./synopsis", line 183, in main
processor = get_opt(sys.argv[1:])
File "./synopsis", line 79, in get_opt
['output=',
File "/usr/lib/python2.3/getopt.py", line 91, in getopt
opts, args = do_shorts(opts, args[0][1:], shortopts, args[1:])
File "/usr/lib/python2.3/getopt.py", line 195, in do_shorts
opt)
getopt.GetoptError: option -p requires argument |
A patch which solves this issue.
Also adjusts error message slightly and prints a warning message if a parser is specified more than once (multiple parsers at once don't make sense, do they?). If this is a correct assumption, perhaps the same can be applied to processors/formatters/linkers. |