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
commit 57a911e098
10 changed files with 22 additions and 37 deletions

View file

@ -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>")