How to make python gracefully fail?,sys.exit(main())