Give a traceback in the log
This commit is contained in:
parent
a7f6451921
commit
ab1677893b
|
@ -1,13 +1,17 @@
|
|||
#!/usr/bin/python3
|
||||
import utils,sys,subprocess
|
||||
import utils,sys,subprocess,traceback
|
||||
utils.setcwd("/home/anonhmmst")
|
||||
|
||||
email = utils.input()
|
||||
|
||||
def log(x):
|
||||
with utils.open("log.txt","a") as f:
|
||||
f.write(x+"\n")
|
||||
|
||||
try:
|
||||
email = utils.input()
|
||||
except:
|
||||
errcls,e,tb = sys.exc_info()
|
||||
log(traceback.format_exception_only(errcls,e))
|
||||
|
||||
title = email.get("Subject")
|
||||
payload = email.get_payload()
|
||||
|
||||
|
|
Loading…
Reference in New Issue