import sys
try:
print("stuff")
except:
sys.exit(1) # exiting with a non zero value is better for returning from an error
import sys
try:
print("stuff")
except:
sys.exit(1) # exiting with a non zero value is better for returning from an error