From be73fc7954cb687f3acb3e8c1268851e540941ae Mon Sep 17 00:00:00 2001 From: Guido Trotter Date: Thu, 23 Jul 2009 08:55:53 +0100 Subject: [PATCH] ganeti-rapi, replace hardcoded exit value substitute exit(1) with exit(constants.EXIT_FAILURE). Also fix a wrongly indented line. Signed-off-by: Guido Trotter Reviewed-by: Michael Hanselmann --- daemons/ganeti-rapi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/daemons/ganeti-rapi b/daemons/ganeti-rapi index f11e66d..2288f17 100755 --- a/daemons/ganeti-rapi +++ b/daemons/ganeti-rapi @@ -214,12 +214,12 @@ def ParseOptions(): if len(args) != 0: print >> sys.stderr, "Usage: %s [-d] [-p port]" % sys.argv[0] - sys.exit(1) + sys.exit(constants.EXIT_FAILURE) if options.ssl and not (options.ssl_cert and options.ssl_key): print >> sys.stderr, ("For secure mode please provide " - "--ssl-key and --ssl-cert arguments") - sys.exit(1) + "--ssl-key and --ssl-cert arguments") + sys.exit(constants.EXIT_FAILURE) return options, args @@ -240,7 +240,7 @@ def main(): ssl_cert_path=options.ssl_cert) except Exception, err: sys.stderr.write("Can't load the SSL certificate/key: %s\n" % (err,)) - sys.exit(1) + sys.exit(constants.EXIT_FAILURE) else: ssl_params = None -- 1.7.10.4