Private
Public Access
1
0

Some more C2 api forensics

This commit is contained in:
Sander Roosendaal
2016-12-21 21:28:28 +01:00
parent e4e2b65bf0
commit 5a0b145fcd
3 changed files with 13 additions and 6 deletions

View File

@@ -997,7 +997,7 @@ def workout_c2_upload_view(request,id=0):
with open("media/c2errors.log","a") as errorlog:
errorstring = str(sys.exc_info()[0])
timestr = time.strftime("%Y%m%d-%H%M%S")
errorlog.write(timestr+errorstring+"\n")
errorlog.write(timestr+errorstring+"\r\n")
# check for duplicate error first
if (response.status_code == 409 ):
@@ -1017,7 +1017,7 @@ def workout_c2_upload_view(request,id=0):
with open("media/c2errors.log","a") as errorlog:
errorstring = str(sys.exc_info()[0])
timestr = time.strftime("%Y%m%d-%H%M%S")
errorlog.write(timestr+errorstring+"\n")
errorlog.write(timestr+errorstring+"\r\n")
else:
@@ -1026,7 +1026,7 @@ def workout_c2_upload_view(request,id=0):
with open("media/c2errors.log","a") as errorlog:
errorstring = str(sys.exc_info()[0])
timestr = time.strftime("%Y%m%d-%H%M%S")
errorlog.write(timestr+errorstring+"\n")
errorlog.write(timestr+errorstring+"\r\n")
else:
message = "You are not authorized to upload this workout"