Wired in Michael's usage string optparse style.

This commit is contained in:
Brad Olson 2012-04-09 23:12:05 +00:00
parent 6749903e57
commit f840c0d167
2 changed files with 3 additions and 1 deletions

View file

@ -57,7 +57,7 @@ class Cli(object):
parser = utils.make_parser(
options,
usage='ansible <host-pattern> [options]',
usage='%prog <host-pattern> [options]',
runas_opts=True,
async_opts=True,
output_opts=True,

View file

@ -284,7 +284,9 @@ def make_parser(add_options, constants=C, usage="", output_opts=False, runas_opt
)
options.update(add_options)
#NOTE: optparse deprecated in Python >= 2.7.
parser = optparse.OptionParser()
parser.set_usage(usage)
names = sorted(options.keys())
for n in names:
data = options[n].copy()