Don't prepend option names with additional '--'

The options now have '--' prepended by their names already, don't
add it.

https://fedorahosted.org/freeipa/ticket/6392

Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
Stanislav Laznicka 2017-02-21 10:21:36 +01:00 committed by Martin Basti
parent 6d34c2169f
commit 9ac068ad04

View File

@ -321,7 +321,7 @@ class ConfigureTool(admintool.AdminTool):
index = self.positional_arguments.index(e.name)
except ValueError:
cli_name = knob_cls.cli_names[0] or e.name.replace('_', '-')
desc = "option --{0}".format(cli_name)
desc = "option {0}".format(cli_name)
else:
desc = "argument {0}".format(index + 1)
self.option_parser.error("{0}: {1}".format(desc, e))