Skip to content

make subcommands mandatory, fixes calls without arguments

Sunil Mohan Adapa requested to merge JoKeyser:fixSubParsers into master

Created by: JoKeyser

For all these actions, calling without any argument lead to the same AttributeError:

subcommand = arguments.subcommand.replace('-', '_')
AttributeError: 'NoneType' object has no attribute 'replace'

Switching subparsers.required = True demands for the subcommands that are set up, so when now calling without arguments, the usage prompt is printed. Something to consider: Should the script also end with an error code?

Merge request reports

Loading