Print help instead of only usage
This commit is contained in:
parent
34f750a7c7
commit
c26a0a058b
|
@ -50,7 +50,7 @@ def add_subcommand(subparsers, module) -> None:
|
||||||
command_parser: ArgumentParser = subparsers.add_parser(
|
command_parser: ArgumentParser = subparsers.add_parser(
|
||||||
command_name, help=command_help
|
command_name, help=command_help
|
||||||
)
|
)
|
||||||
command_parser.set_defaults(func=lambda args: command_parser.print_usage())
|
command_parser.set_defaults(func=lambda args: command_parser.print_help())
|
||||||
|
|
||||||
# Add all subcommands in the command module
|
# Add all subcommands in the command module
|
||||||
subcommands = command_parser.add_subparsers(metavar="SUBCOMMAND")
|
subcommands = command_parser.add_subparsers(metavar="SUBCOMMAND")
|
||||||
|
@ -97,7 +97,7 @@ def main():
|
||||||
parser = ArgumentParser()
|
parser = ArgumentParser()
|
||||||
parser.set_defaults(
|
parser.set_defaults(
|
||||||
parser=parser,
|
parser=parser,
|
||||||
func=lambda args: parser.print_usage(),
|
func=lambda args: parser.print_help(),
|
||||||
get_db=None,
|
get_db=None,
|
||||||
)
|
)
|
||||||
parser.add_argument("--verbose", "-v", action="store_true", help="Verbose output")
|
parser.add_argument("--verbose", "-v", action="store_true", help="Verbose output")
|
||||||
|
|
Loading…
Reference in New Issue