Wired in Michael's usage string optparse style.

pull/126/head
Brad Olson 13 years ago
parent 6749903e57
commit f840c0d167

@ -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,

@ -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()

Loading…
Cancel
Save