Private
Public Access
1
0

some more error detection code

This commit is contained in:
Sander Roosendaal
2017-01-22 20:35:51 +01:00
parent 78ea02b9b4
commit d04200d1ec
2 changed files with 22 additions and 1 deletions

View File

@@ -868,6 +868,18 @@ def workout_strava_upload_view(request,id=0):
res = stravastuff.handle_stravaexport(f,w.name,
r.stravatoken,
description=w.notes)
if res==0:
message = "Strava Upload error: %s" % e
w.uploadedtostrava = -1
w.save()
os.remove(tcxfile)
url = reverse(workout_export_view,
kwargs = {
'id':str(w.id),
})
response = HttpResponseRedirect(url)
return response
except:
with open("media/stravaerrors.log","a") as errorlog:
errorstring = str(sys.exc_info()[0])