If you don’t handle it, check if it really executes the sys.exist (1) statement because some other exception may occur that is not being processed, try this ....
xml_open()
try:
run(reloader=True, host='localhost', port=8080)
except SystemExit:
xml_save()
print "Exited ..."
except Exception, e:
print "ohhh no.......",str(e)
import pdb
pdb.post_mortem()
sys.exit(-1)
source
share