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
This commit is contained in:
Petr Viktorin authored and Rob Crittenden committed 2013-02-18 13:07:17 -05:00
1 parent f16c100f1e
commit abe26d55c8
1 file changed
+1 -1
+1 -1
View File
@@ -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():