Include defaults in the help output

For some reason argparse doesn't do this by default, but it does
provide an easy way to turn it on.
This commit is contained in:
Ben Nemec 2016-06-10 17:04:33 +00:00
parent 5787072de4
commit 520788d40c

View File

@ -42,7 +42,8 @@ def _parse_args():
parser = argparse.ArgumentParser( parser = argparse.ArgumentParser(
description='Download and instll dlrn repos. Note that these repos ' description='Download and instll dlrn repos. Note that these repos '
'require yum-plugin-priorities in order to function ' 'require yum-plugin-priorities in order to function '
'correctly, so that will also be installed.') 'correctly, so that will also be installed.',
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('repos', metavar='REPO', nargs='+', parser.add_argument('repos', metavar='REPO', nargs='+',
help='A list of delorean repos. Available repos: ' help='A list of delorean repos. Available repos: '
'current, deps, current-tripleo. current-tripleo ' 'current, deps, current-tripleo. current-tripleo '