Use sys.exit(msg) i/o print() and sys.exit() (#15465)

Any non-0 exits should be showing an error message
to stderr instead of to stdout.
This commit is contained in:
Adrian Likins 2016-08-23 11:09:23 -04:00 committed by Brian Coca
parent 76f9935634
commit 57a911e098
10 changed files with 22 additions and 37 deletions

View file

@ -62,8 +62,7 @@ def get_config(env_var, config_var):
if not result:
result = get_from_rhc_config(config_var)
if not result:
print("failed=True msg='missing %s'" % env_var)
sys.exit(1)
sys.exit("failed=True msg='missing %s'" % env_var)
return result