Private
Public Access
1
0

Merge tag 'v2.98' into develop

strava fix
This commit is contained in:
Sander Roosendaal
2017-05-22 20:14:41 +02:00
2 changed files with 14 additions and 7 deletions

View File

@@ -250,7 +250,12 @@ def createstravaworkoutdata(w):
row = rowingdata(filename)
tcxfilename = filename[:-4]+'.tcx'
row.exporttotcx(tcxfilename,notes=w.notes+'\n from '+w.workoutsource+' via rowsandall.com')
try:
newnotes = w.notes+'\n from '+w.workoutsource+' via rowsandall.com'
except TypeError:
newnotes = 'from '+w.workoutsource+' via rowsandall.com'
row.exporttotcx(tcxfilename,notes=newnotes)
gzfilename = tcxfilename+'.gz'
with file(tcxfilename,'rb') as inF:
s = inF.read()

View File

@@ -218,16 +218,18 @@ def getidfromresponse(response):
def createtpworkoutdata(w):
filename = w.csvfilename
row = rowingdata(filename)
tcxfilename = filename[:-4]+'.tcx'
try:
row = rowingdata(filename)
tcxfilename = filename[:-4]+'.tcx'
row.exporttotcx(tcxfilename,notes=w.notes+'\n from '+w.workoutsource+' via rowsandall.com')
return tcxfilename
except:
tcxfilename = 0
newnotes = w.notes+'\n from '+w.workoutsource+' via rowsandall.com'
except TypeError:
newnotes = 'from '+w.workoutsource+' via rowsandall.com'
row.exporttotcx(tcxfilename,notes=newnotes)
return tcxfilename
def tp_check(access_token):
headers = {
"Content-Type": "application/json",