mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-10 18:34:03 -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
|
@ -40,4 +40,4 @@ if len(sys.argv) == 2 and sys.argv[1] == '--list':
|
|||
elif len(sys.argv) == 3 and sys.argv[1] == '--host':
|
||||
print(json.dumps({'ansible_connection': 'zone'}))
|
||||
else:
|
||||
print("Need an argument, either --list or --host <host>")
|
||||
sys.stderr.write("Need an argument, either --list or --host <host>\n")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue