summaryrefslogtreecommitdiffstats
path: root/install/tools/ipa-server-certinstall
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2010-11-08 23:13:48 +0100
committerAdam Young <ayoung@redhat.com>2010-11-22 09:51:07 -0500
commit57e1edd052dda284be87e29e1e839af4a9324faf (patch)
tree00fa2924e12c309d6cef25056feed37212ef8cd7 /install/tools/ipa-server-certinstall
parent3e540272c69c9697a52a0e2d04ed3c2ae93740f4 (diff)
downloadfreeipa-57e1edd052dda284be87e29e1e839af4a9324faf.zip
freeipa-57e1edd052dda284be87e29e1e839af4a9324faf.tar.gz
freeipa-57e1edd052dda284be87e29e1e839af4a9324faf.tar.xz
Use sys.exit to quit scripts
Instead of print and return, use sys.exit() to quit scripts with an error message and a non zero return code. https://fedorahosted.org/freeipa/ticket/425
Diffstat (limited to 'install/tools/ipa-server-certinstall')
-rwxr-xr-xinstall/tools/ipa-server-certinstall5
1 files changed, 2 insertions, 3 deletions
diff --git a/install/tools/ipa-server-certinstall b/install/tools/ipa-server-certinstall
index 9d69853..4b46053 100755
--- a/install/tools/ipa-server-certinstall
+++ b/install/tools/ipa-server-certinstall
@@ -156,9 +156,8 @@ def main():
os.chown(dirname + "/secmod.db", 0, pent.pw_gid )
except Exception, e:
- print "an unexpected error occurred: %s" % str(e)
- traceback.print_exc()
- return 1
+ traceback.print_exc(file=sys.stderr)
+ sys.exit("an unexpected error occurred: %s" % str(e))
return 0