some more error detection code
This commit is contained in:
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user