mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-24 16:10:02 -06:00
324: Removed 'smart_option_order' from Command.__public__; cli commands help, console, and show_plugins now override Command.run() instead of Command.__call__()
This commit is contained in:
parent
19bbc48eb6
commit
3bf2da5714
@ -57,7 +57,7 @@ class help(frontend.Application):
|
||||
|
||||
takes_args = ['command']
|
||||
|
||||
def __call__(self, key):
|
||||
def run(self, key):
|
||||
key = str(key)
|
||||
if key not in self.application:
|
||||
print 'help: no such command %r' % key
|
||||
@ -70,16 +70,17 @@ class help(frontend.Application):
|
||||
class console(frontend.Application):
|
||||
'Start the IPA interactive Python console.'
|
||||
|
||||
def __call__(self):
|
||||
def run(self):
|
||||
code.interact(
|
||||
'(Custom IPA interactive Python console)',
|
||||
local=dict(api=self.api)
|
||||
)
|
||||
|
||||
|
||||
class show_plugins(frontend.Application):
|
||||
'Print details on the loaded plugins.'
|
||||
|
||||
def __call__(self):
|
||||
def run(self):
|
||||
lines = self.__traverse()
|
||||
ml = max(len(l[1]) for l in lines)
|
||||
for line in lines:
|
||||
|
@ -245,7 +245,6 @@ class Command(plugable.Plugin):
|
||||
'validate',
|
||||
'execute',
|
||||
'__call__',
|
||||
'smart_option_order',
|
||||
'args',
|
||||
'options',
|
||||
'params',
|
||||
|
Loading…
Reference in New Issue
Block a user