sporttracks callback
This commit is contained in:
@@ -1170,12 +1170,12 @@ def workout_tp_upload_view(request,id=0):
|
||||
if (checkworkoutuser(request.user,w)):
|
||||
tcxfile = tpstuff.createtpworkoutdata(w)
|
||||
if tcxfile:
|
||||
res,reason,status_code,headers = tpstuff.uploadactivity(r.tptoken,tcxfile,
|
||||
name=w.name)
|
||||
res,reason,status_code,headers = tpstuff.uploadactivity(
|
||||
r.tptoken,tcxfile,
|
||||
name=w.name
|
||||
)
|
||||
if res == 0:
|
||||
message = "Upload to TrainingPeaks failed with status code "+str(status_code)+": "+reason
|
||||
w.uploadedtotp = -1
|
||||
w.save()
|
||||
try:
|
||||
os.remove(tcxfile)
|
||||
except WindowsError:
|
||||
|
||||
Reference in New Issue
Block a user