mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-23 07:33:27 -06:00
21: ipa script: improved print_api(); added missing sys.exit() after print_api() call
This commit is contained in:
parent
14339cfae0
commit
97a3520d37
6
ipa
6
ipa
@ -47,8 +47,9 @@ def print_api():
|
||||
for n in obj.commands:
|
||||
print ' .%s()' % n
|
||||
|
||||
print '%d objects' % len(api.objects)
|
||||
print '%d commands' % len(api.commands)
|
||||
print '\nStats:'
|
||||
print ' %d objects' % len(api.objects)
|
||||
print ' %d commands' % len(api.commands)
|
||||
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
@ -58,6 +59,7 @@ if len(sys.argv) < 2:
|
||||
cmd = sys.argv[1]
|
||||
if cmd == '_api_':
|
||||
print_api()
|
||||
sys.exit()
|
||||
elif cmd not in api.commands:
|
||||
print_commands()
|
||||
print 'ipa: ERROR: unknown command %r' % cmd
|
||||
|
Loading…
Reference in New Issue
Block a user