Commit f840c0d1 by Brad Olson

Wired in Michael's usage string optparse style.

parent 6749903e
......@@ -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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment