From 7ccc959ebdf58d186d260bfd36966ab942117865 Mon Sep 17 00:00:00 2001 From: Darko Poljak Date: Wed, 28 Feb 2018 23:29:45 +0100 Subject: [PATCH] Bugfix: --beta on the commandline does not seem to work #635 Fix argparse parsers. --- cdist/argparse.py | 7 ++----- docs/src/man1/cdist.rst | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/cdist/argparse.py b/cdist/argparse.py index a9f3ad9f..66a87094 100644 --- a/cdist/argparse.py +++ b/cdist/argparse.py @@ -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") diff --git a/docs/src/man1/cdist.rst b/docs/src/man1/cdist.rst index c76520a6..90168f86 100644 --- a/docs/src/man1/cdist.rst +++ b/docs/src/man1/cdist.rst @@ -11,8 +11,7 @@ SYNOPSIS :: - cdist [-h] [-l LOGLEVEL] [-q] [-v] [-V] - {banner,config,install,inventory,shell} ... + cdist [-h] [-V] {banner,config,install,inventory,shell} ... cdist banner [-h] [-l LOGLEVEL] [-q] [-v] @@ -32,9 +31,7 @@ SYNOPSIS [-A] [-a] [-f HOSTFILE] [-p [HOST_MAX]] [-S] [-s] [-t] [host [host ...]] - cdist inventory [-h] [-l LOGLEVEL] [-q] [-v] [-b] [-g CONFIG_FILE] - [-I INVENTORY_DIR] - {add-host,add-tag,del-host,del-tag,list} ... + cdist inventory [-h] {add-host,add-tag,del-host,del-tag,list} ... cdist inventory add-host [-h] [-l LOGLEVEL] [-q] [-v] [-b] [-g CONFIG_FILE] [-I INVENTORY_DIR]