mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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:
committed by
Rob Crittenden
parent
f16c100f1e
commit
abe26d55c8
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user