mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
21: ipa script: improved print_api(); added missing sys.exit() after print_api() call
This commit is contained in:
6
ipa
6
ipa
@@ -47,8 +47,9 @@ def print_api():
|
|||||||
for n in obj.commands:
|
for n in obj.commands:
|
||||||
print ' .%s()' % n
|
print ' .%s()' % n
|
||||||
|
|
||||||
print '%d objects' % len(api.objects)
|
print '\nStats:'
|
||||||
print '%d commands' % len(api.commands)
|
print ' %d objects' % len(api.objects)
|
||||||
|
print ' %d commands' % len(api.commands)
|
||||||
|
|
||||||
|
|
||||||
if len(sys.argv) < 2:
|
if len(sys.argv) < 2:
|
||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user