mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-30 12:59:09 -07: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:
parent
76f9935634
commit
57a911e098
10 changed files with 22 additions and 37 deletions
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue