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
|
# Main subcommand parser
|
||||||
parser['main'] = argparse.ArgumentParser(
|
parser['main'] = argparse.ArgumentParser(
|
||||||
description='cdist ' + cdist.VERSION, parents=[parser['loglevel']])
|
description='cdist ' + cdist.VERSION)
|
||||||
parser['main'].add_argument(
|
parser['main'].add_argument(
|
||||||
'-V', '--version', help='Show version.', action='version',
|
'-V', '--version', help='Show version.', action='version',
|
||||||
version='%(prog)s ' + cdist.VERSION)
|
version='%(prog)s ' + cdist.VERSION)
|
||||||
|
@ -289,10 +289,7 @@ def get_parsers():
|
||||||
parser['install'].set_defaults(func=cdist.install.Install.commandline)
|
parser['install'].set_defaults(func=cdist.install.Install.commandline)
|
||||||
|
|
||||||
# Inventory
|
# Inventory
|
||||||
parser['inventory'] = parser['sub'].add_parser(
|
parser['inventory'] = parser['sub'].add_parser('inventory')
|
||||||
'inventory', parents=[parser['loglevel'], parser['beta'],
|
|
||||||
parser['common'],
|
|
||||||
parser['inventory_common']])
|
|
||||||
parser['invsub'] = parser['inventory'].add_subparsers(
|
parser['invsub'] = parser['inventory'].add_subparsers(
|
||||||
title="Inventory commands", dest="subcommand")
|
title="Inventory commands", dest="subcommand")
|
||||||
|
|
||||||
|
|
|
@ -11,8 +11,7 @@ SYNOPSIS
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
cdist [-h] [-l LOGLEVEL] [-q] [-v] [-V]
|
cdist [-h] [-V] {banner,config,install,inventory,shell} ...
|
||||||
{banner,config,install,inventory,shell} ...
|
|
||||||
|
|
||||||
cdist banner [-h] [-l LOGLEVEL] [-q] [-v]
|
cdist banner [-h] [-l LOGLEVEL] [-q] [-v]
|
||||||
|
|
||||||
|
@ -32,9 +31,7 @@ SYNOPSIS
|
||||||
[-A] [-a] [-f HOSTFILE] [-p [HOST_MAX]] [-S] [-s] [-t]
|
[-A] [-a] [-f HOSTFILE] [-p [HOST_MAX]] [-S] [-s] [-t]
|
||||||
[host [host ...]]
|
[host [host ...]]
|
||||||
|
|
||||||
cdist inventory [-h] [-l LOGLEVEL] [-q] [-v] [-b] [-g CONFIG_FILE]
|
cdist inventory [-h] {add-host,add-tag,del-host,del-tag,list} ...
|
||||||
[-I INVENTORY_DIR]
|
|
||||||
{add-host,add-tag,del-host,del-tag,list} ...
|
|
||||||
|
|
||||||
cdist inventory add-host [-h] [-l LOGLEVEL] [-q] [-v] [-b]
|
cdist inventory add-host [-h] [-l LOGLEVEL] [-q] [-v] [-b]
|
||||||
[-g CONFIG_FILE] [-I INVENTORY_DIR]
|
[-g CONFIG_FILE] [-I INVENTORY_DIR]
|
||||||
|
|
Loading…
Reference in a new issue