Added stacktrace to debug

This commit is contained in:
xdavidhu 2017-04-03 23:22:42 +02:00
parent e80651c22e
commit 32541632b1

View File

@ -11,6 +11,7 @@ See License at nikolaskama.me (https://nikolaskama.me/kickthemoutproject)
import time, os, sys, logging, math import time, os, sys, logging, math
from time import sleep from time import sleep
import urllib2 as urllib import urllib2 as urllib
import traceback
BLUE, RED, WHITE, YELLOW, MAGENTA, GREEN, END = '\33[94m', '\033[91m', '\33[97m', '\33[93m', '\033[1;35m', '\033[1;32m', '\033[0m' BLUE, RED, WHITE, YELLOW, MAGENTA, GREEN, END = '\33[94m', '\033[91m', '\33[97m', '\33[93m', '\033[1;35m', '\033[1;32m', '\033[0m'
notRoot = False notRoot = False
@ -88,6 +89,11 @@ def runDebug():
print hostsList print hostsList
except: except:
print ("Failed to print hostsList array...") print ("Failed to print hostsList array...")
try:
print ("Crash trace: ")
print(traceback.format_exc())
except:
print ("Failed to print crash trace...")
print ("DEBUG FINISHED.\nShutting down...") print ("DEBUG FINISHED.\nShutting down...")
print("{0}").format(END) print("{0}").format(END)
raise SystemExit raise SystemExit