Commit be73fc79 authored by Guido Trotter's avatar Guido Trotter
Browse files

ganeti-rapi, replace hardcoded exit value



substitute exit(1) with exit(constants.EXIT_FAILURE).
Also fix a wrongly indented line.
Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 8790ac54
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment