Bugfix: --beta on the commandline does not seem to work #635
Fix argparse parsers.
This commit is contained in:
parent
3fb7e33305
commit
7ccc959ebd
2 changed files with 4 additions and 10 deletions
|
|
@ -131,7 +131,7 @@ def get_parsers():
|
|||
|
||||
# Main subcommand parser
|
||||
parser['main'] = argparse.ArgumentParser(
|
||||
description='cdist ' + cdist.VERSION, parents=[parser['loglevel']])
|
||||
description='cdist ' + cdist.VERSION)
|
||||
parser['main'].add_argument(
|
||||
'-V', '--version', help='Show version.', action='version',
|
||||
version='%(prog)s ' + cdist.VERSION)
|
||||
|
|
@ -289,10 +289,7 @@ def get_parsers():
|
|||
parser['install'].set_defaults(func=cdist.install.Install.commandline)
|
||||
|
||||
# Inventory
|
||||
parser['inventory'] = parser['sub'].add_parser(
|
||||
'inventory', parents=[parser['loglevel'], parser['beta'],
|
||||
parser['common'],
|
||||
parser['inventory_common']])
|
||||
parser['inventory'] = parser['sub'].add_parser('inventory')
|
||||
parser['invsub'] = parser['inventory'].add_subparsers(
|
||||
title="Inventory commands", dest="subcommand")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue