Private
Public Access
1
0

loggin tp errors

This commit is contained in:
Sander Roosendaal
2020-06-07 13:29:27 +02:00
parent 1539c6e6d5
commit e55b4fc3ca

View File

@@ -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()