summaryrefslogtreecommitdiff
path: root/examples/subcommands.py
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2019-10-30 19:00:33 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2019-10-30 19:00:33 -0400
commite6dfe02901f8a6bf5059fa25ff28601af5366fad (patch)
treec7de2a9acfb913425c5da7e0d935271ff96ce164 /examples/subcommands.py
parenta6f131b65e9a7e227eade57ffcf833b1f06ec3ea (diff)
downloadcmd2-git-e6dfe02901f8a6bf5059fa25ff28601af5366fad.tar.gz
Removed all instances where a parser's prog attribute was being set since this is no longer needed
Diffstat (limited to 'examples/subcommands.py')
-rwxr-xr-xexamples/subcommands.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/subcommands.py b/examples/subcommands.py
index 0b228e79..4f569b1e 100755
--- a/examples/subcommands.py
+++ b/examples/subcommands.py
@@ -12,7 +12,7 @@ import cmd2
sport_item_strs = ['Bat', 'Basket', 'Basketball', 'Football', 'Space Ball']
# create the top-level parser for the base command
-base_parser = argparse.ArgumentParser(prog='base')
+base_parser = argparse.ArgumentParser()
base_subparsers = base_parser.add_subparsers(title='subcommands', help='subcommand help')
# create the parser for the "foo" subcommand
@@ -38,7 +38,7 @@ sport_arg = parser_sport.add_argument('sport', help='Enter name of a sport', cho
# create the top-level parser for the alternate command
# The alternate command doesn't provide its own help flag
-base2_parser = argparse.ArgumentParser(prog='alternate', add_help=False)
+base2_parser = argparse.ArgumentParser(add_help=False)
base2_subparsers = base2_parser.add_subparsers(title='subcommands', help='subcommand help')
# create the parser for the "foo" subcommand