list -> set for beta commands and args
This commit is contained in:
parent
609977b7ff
commit
3e763e9e6c
1 changed files with 6 additions and 7 deletions
|
@ -6,11 +6,11 @@ import logging
|
||||||
import collections
|
import collections
|
||||||
|
|
||||||
|
|
||||||
# list of beta sub-commands
|
# set of beta sub-commands
|
||||||
BETA_COMMANDS = ['install', ]
|
BETA_COMMANDS = set(('install', ))
|
||||||
# list of beta arguments for sub-commands
|
# set of beta arguments for sub-commands
|
||||||
BETA_ARGS = {
|
BETA_ARGS = {
|
||||||
'config': ['jobs', ],
|
'config': set(('jobs', )),
|
||||||
}
|
}
|
||||||
EPILOG = "Get cdist at http://www.nico.schottelius.org/software/cdist/"
|
EPILOG = "Get cdist at http://www.nico.schottelius.org/software/cdist/"
|
||||||
# Parser others can reuse
|
# Parser others can reuse
|
||||||
|
@ -27,8 +27,7 @@ _verbosity_level = collections.defaultdict(
|
||||||
|
|
||||||
|
|
||||||
def add_beta_command(cmd):
|
def add_beta_command(cmd):
|
||||||
if cmd not in BETA_COMMANDS:
|
BETA_COMMANDS.add(cmd)
|
||||||
BETA_COMMANDS.append(cmd)
|
|
||||||
|
|
||||||
|
|
||||||
def add_beta_arg(cmd, arg):
|
def add_beta_arg(cmd, arg):
|
||||||
|
@ -36,7 +35,7 @@ def add_beta_arg(cmd, arg):
|
||||||
if arg not in BETA_ARGS[cmd]:
|
if arg not in BETA_ARGS[cmd]:
|
||||||
BETA_ARGS[cmd].append(arg)
|
BETA_ARGS[cmd].append(arg)
|
||||||
else:
|
else:
|
||||||
BETA_ARGS[cmd] = [arg, ]
|
BETA_ARGS[cmd] = set((arg, ))
|
||||||
|
|
||||||
|
|
||||||
def check_beta(args_dict):
|
def check_beta(args_dict):
|
||||||
|
|
Loading…
Reference in a new issue