doclifter --help results in a traceback
This has been originally reported here: https://bugzilla.redhat.com/show_bug.cgi?id=1679607.
Running doclifter --help
results in the following traceback:
$ doclifter --help
Traceback (most recent call last):
File "/usr/bin/doclifter", line 9011, in <module>
sys.exit(main(sys.argv[1:]))
File "/usr/bin/doclifter", line 8941, in main
(options, arguments) = getopt.getopt(args, "d:e:i:D:I:h:qsS:xvwV")
File "/usr/lib64/python3.7/getopt.py", line 93, in getopt
opts, args = do_longs(opts, args[0][2:], longopts, args[1:])
File "/usr/lib64/python3.7/getopt.py", line 157, in do_longs
has_arg, opt = long_has_args(opt, longopts)
File "/usr/lib64/python3.7/getopt.py", line 174, in long_has_args
raise GetoptError(_('option --%s not recognized') % opt, opt)
getopt.GetoptError: option --help not recognized
It looks like long options are not supported by doclifter at all, for instance doclifter --foo
results in a similar traceback.
Could this be changed to a more user friendly error message? And preferably --help
providing a short usage message?
I can recommend python's argparse module for that. If you'd like, I can create a prototype of that.