URL: https://github.com/freeipa/freeipa/pull/491 Author: stlaz Title: #491: Don't prepend option names with additional '--' Action: opened
PR body: """ The options now have '--' prepended by their names already, don't add it. https://fedorahosted.org/freeipa/ticket/6392 The issue example: running `ipa-client-install --ca-cert-file /home/cartman/nonexistent_file` gives ``` Usage: ipa-client-install [options] ipa-client-install: error: option ----ca-cert-file: '/home/slaznick/pokus' is not a valid certificate file ``` """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/491/head:pr491 git checkout pr491
From 2bb00f8fba5f0b6189e69f1a379d51158b28b593 Mon Sep 17 00:00:00 2001 From: Stanislav Laznicka <slazn...@redhat.com> Date: Tue, 21 Feb 2017 10:21:36 +0100 Subject: [PATCH] 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 --- ipapython/install/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipapython/install/cli.py b/ipapython/install/cli.py index 441c875..741bf9d 100644 --- a/ipapython/install/cli.py +++ b/ipapython/install/cli.py @@ -321,7 +321,7 @@ def run(self): 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))
-- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code