[python] How do I stop a program when an exception is raised in Python?