neogenix/daikon — Issue #28: Sys.exit(0) is redundant
Author: jkoelker
Created: 2011-11-06 22:58:32+00:00
State: open

sys.exit() should only be called sparingly and usually not with 0.

Functions that need to report a non-zero status, should raise exceptions. The main function should catch these exceptions and translate them into an exit code which main would return.

Then in the if __name__ == '__main__' portion it would change to :
exit = main()
if exit:
sys.exit(exit)