chg: [command] The selection of a sub-command is mandatory.

This commit is contained in:
Cédric Bonhomme 2022-11-20 21:37:29 +01:00
parent 3b619afa17
commit 0f8b0cef1f
No known key found for this signature in database
GPG key ID: A1CB94DE57B7A70D
5 changed files with 7 additions and 5 deletions

View file

@ -55,7 +55,8 @@ class ValidateGenerator(argparse.Action):
def main():
parser = argparse.ArgumentParser(prog="stegano-lsb")
subparsers = parser.add_subparsers(help="sub-command help", dest="command")
subparsers = parser.add_subparsers(
help="sub-command help", dest="command", required=True)
# Subparser: Hide
parser_hide = subparsers.add_parser("hide", help="hide help")
@ -85,6 +86,7 @@ def main():
action=ValidateGenerator,
nargs="*",
required=False,
default=None,
help="Generator (with optional arguments)",
)