summaryrefslogtreecommitdiffstats
path: root/ipa
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2008-07-20 18:50:40 +0000
committerJason Gerard DeRose <jderose@redhat.com>2008-07-20 18:50:40 +0000
commit97a3520d3737d10717956ad6fff1e558e7261a2d (patch)
tree0f5643291ac5c2f6aa8b1d6eeec04f6ebed5aa12 /ipa
parent14339cfae01b843949d0f9972670f56f952a5faa (diff)
downloadfreeipa-97a3520d3737d10717956ad6fff1e558e7261a2d.tar.gz
freeipa-97a3520d3737d10717956ad6fff1e558e7261a2d.tar.xz
freeipa-97a3520d3737d10717956ad6fff1e558e7261a2d.zip
21: ipa script: improved print_api(); added missing sys.exit() after print_api() call
Diffstat (limited to 'ipa')
-rwxr-xr-xipa6
1 files changed, 4 insertions, 2 deletions
diff --git a/ipa b/ipa
index 91bdc021d..50ea082f9 100755
--- a/ipa
+++ b/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