Private
Public Access
1
0

fixed strava export bug

This commit is contained in:
Sander Roosendaal
2017-05-22 20:13:17 +02:00
parent 0ef6840d22
commit 969077fe22
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()