mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
265: Fixed small formatting error with use of CLI.print_commands()
This commit is contained in:
parent
553b0c596d
commit
22d9b8c078
@ -107,6 +107,7 @@ class CLI(object):
|
||||
print '\nSpecial CLI commands:'
|
||||
for cmd in self.api.Application():
|
||||
self.print_cmd(cmd)
|
||||
print ''
|
||||
|
||||
def print_cmd(self, cmd):
|
||||
print ' %s %s' % (
|
||||
@ -114,8 +115,6 @@ class CLI(object):
|
||||
cmd.doc,
|
||||
)
|
||||
|
||||
|
||||
|
||||
def __contains__(self, key):
|
||||
assert self.__d is not None, 'you must call finalize() first'
|
||||
return key in self.__d
|
||||
@ -139,12 +138,11 @@ class CLI(object):
|
||||
(c.name.replace('_', '-'), c) for c in self.api.Command()
|
||||
)
|
||||
|
||||
|
||||
def run(self):
|
||||
self.finalize()
|
||||
if len(sys.argv) < 2:
|
||||
self.print_commands()
|
||||
print '\nUsage: ipa COMMAND'
|
||||
print 'Usage: ipa COMMAND'
|
||||
sys.exit(2)
|
||||
key = sys.argv[1]
|
||||
if key not in self:
|
||||
|
Loading…
Reference in New Issue
Block a user