loggin tp errors
This commit is contained in:
@@ -72,6 +72,15 @@ def get_token(code):
|
||||
data=post_data,verify=False,
|
||||
)
|
||||
|
||||
print(response.text)
|
||||
|
||||
with open("media/tperrors.log","a") as errorlog:
|
||||
timestr = strftime("%Y%m%d-%H%M%S")
|
||||
errorlog.write(timestr+"\r\n")
|
||||
json.dump(response.json(),errorlog)
|
||||
errorlog.write("\r\n"+str(response.status_code)+' '+response.text)
|
||||
errorlog.write("\r\n")
|
||||
|
||||
|
||||
try:
|
||||
token_json = response.json()
|
||||
|
||||
Reference in New Issue
Block a user