Code to check Strava behaviour
This commit is contained in:
@@ -934,9 +934,17 @@ def workout_strava_upload_view(request,id=0):
|
||||
|
||||
try:
|
||||
with open(tcxfile,'rb') as f:
|
||||
res = stravastuff.handle_stravaexport(f,w.name,
|
||||
r.stravatoken,
|
||||
description=w.notes)
|
||||
try:
|
||||
res = stravastuff.handle_stravaexport(f,w.name,
|
||||
r.stravatoken,
|
||||
description=w.notes)
|
||||
except:
|
||||
with open("media/stravaerrors.log","a") as errorlog:
|
||||
errorstring = str(sys.exc_info()[0])
|
||||
timestr = time.strftime("%Y%m%d-%H%M%S")
|
||||
errorlog.write(timestr+errorstring+"\r\n")
|
||||
errorlog.write("views.py line 946\r\n")
|
||||
|
||||
|
||||
w.uploadedtostrava = res
|
||||
w.save()
|
||||
|
||||
Reference in New Issue
Block a user