Until now, when an error was encountered, the message would be printed to stdout as any other, and the program would exit with the code 0 - implying a success.
Using the sys.exit method for error messages makes the message go to stderr and exits with code 1 - following the Unix convention.
Until now, when an error was encountered, the message would be printed to
stdout
as any other, and the program would exit with the code0
- implying a success.Using the
sys.exit
method for error messages makes the message go tostderr
and exits with code1
- following the Unix convention.