mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-23 23:50:03 -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
2
ipa
2
ipa
@ -47,6 +47,7 @@ def print_api():
|
|||||||
for n in obj.commands:
|
for n in obj.commands:
|
||||||
print ' .%s()' % n
|
print ' .%s()' % n
|
||||||
|
|
||||||
|
print '\nStats:'
|
||||||
print ' %d objects' % len(api.objects)
|
print ' %d objects' % len(api.objects)
|
||||||
print ' %d commands' % len(api.commands)
|
print ' %d commands' % len(api.commands)
|
||||||
|
|
||||||
@ -58,6 +59,7 @@ if len(sys.argv) < 2:
|
|||||||
cmd = sys.argv[1]
|
cmd = sys.argv[1]
|
||||||
if cmd == '_api_':
|
if cmd == '_api_':
|
||||||
print_api()
|
print_api()
|
||||||
|
sys.exit()
|
||||||
elif cmd not in api.commands:
|
elif cmd not in api.commands:
|
||||||
print_commands()
|
print_commands()
|
||||||
print 'ipa: ERROR: unknown command %r' % cmd
|
print 'ipa: ERROR: unknown command %r' % cmd
|
||||||
|
Loading…
Reference in New Issue
Block a user