I think you want <code>sys.exit(0)</code> here.