mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
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:
committed by
Brian Coca
parent
76f9935634
commit
57a911e098
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user