Closed cod3monk closed 7 years ago
Actually I get a different output when running that line:
python stempel.py usage: stempel.py [-h] {gen,bench} ... stempel.py: error: too few arguments
You must have a different code, because only the subparsers parser_gen
and parser_bench
provide a func
argument. If neither is invoked the argument won't exist.
At least that is my interpretation of the create_parser()
and main()
functions.
You can add subparsers.required = True
to require the user to select a subparser. If not, parsing will throw and handle an exception and never get to the "business logic" (args.func(args, parser)
).
should either do something useful or return the help text.