summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2012-11-08 08:59:31 -0500
committerRob Crittenden <rcritten@redhat.com>2013-02-18 13:07:17 -0500
commitabe26d55c8f43e3a213fe831df7f0536d0600288 (patch)
tree25cfc18640898041494bf537ba30f951e439cf77
parentf16c100f1e72e8afbe26e12e7d236d3ef60f4433 (diff)
downloadfreeipa-abe26d55c8f43e3a213fe831df7f0536d0600288.tar.gz
freeipa-abe26d55c8f43e3a213fe831df7f0536d0600288.tar.xz
freeipa-abe26d55c8f43e3a213fe831df7f0536d0600288.zip
Parse command arguments before creating a context
This allows users to run `ipa COMMAND --help` even without Kerberos credentials. Part of the effort for https://fedorahosted.org/freeipa/ticket/3060
-rw-r--r--ipalib/cli.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ipalib/cli.py b/ipalib/cli.py
index 59abc3b15..74c43b590 100644
--- a/ipalib/cli.py
+++ b/ipalib/cli.py
@@ -1051,10 +1051,10 @@ class cli(backend.Executioner):
if cmd is None:
return
name = cmd.name
+ kw = self.argv_to_keyword_arguments(cmd, argv[1:])
if not isinstance(cmd, frontend.Local):
self.create_context()
try:
- kw = self.argv_to_keyword_arguments(cmd, argv[1:])
result = self.execute(name, **kw)
if callable(cmd.output_for_cli):
for param in cmd.params():