mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-11 19:04:02 -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
|
@ -226,5 +226,4 @@ elif len(sys.argv) == 3 and (sys.argv[1] == '--host'):
|
|||
sys.exit(0)
|
||||
|
||||
else:
|
||||
print("usage: --list ..OR.. --host <hostname>")
|
||||
sys.exit(1)
|
||||
sys.exit("usage: --list ..OR.. --host <hostname>")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue