import sys
import log
import traceback
-import StringIO
+import sys
+from io import StringIO
import os
import time
exctype, value = sys.exc_info()[:2]
if exctype == SystemExit:
sys.exit(value)
- s = StringIO.StringIO()
+ s = StringIO()
traceback.print_exc(file = s, limit = 20)
log.alert("fatal python exception")