Private
Public Access
1
0

Merge tag 'v2.97' into develop

removed strava error catching
This commit is contained in:
Sander Roosendaal
2017-05-22 15:17:21 +02:00

View File

@@ -247,7 +247,7 @@ def get_strava_workout(user,stravaid):
# Generate Workout data for Strava (a TCX file) # Generate Workout data for Strava (a TCX file)
def createstravaworkoutdata(w): def createstravaworkoutdata(w):
filename = w.csvfilename filename = w.csvfilename
try:
row = rowingdata(filename) row = rowingdata(filename)
tcxfilename = filename[:-4]+'.tcx' tcxfilename = filename[:-4]+'.tcx'
row.exporttotcx(tcxfilename,notes=w.notes+'\n from '+w.workoutsource+' via rowsandall.com') row.exporttotcx(tcxfilename,notes=w.notes+'\n from '+w.workoutsource+' via rowsandall.com')
@@ -256,17 +256,14 @@ def createstravaworkoutdata(w):
s = inF.read() s = inF.read()
with gzip.GzipFile(gzfilename,'wb') as outF: with gzip.GzipFile(gzfilename,'wb') as outF:
outF.write(s) outF.write(s)
try: try:
os.remove(tcxfilename) os.remove(tcxfilename)
except WindowError: except WindowError:
pass pass
return gzfilename,"" return gzfilename,""
except:
message = "createstravaworkoutdata "+str(sys.exc_info()[0])
tcxfilename = 0
return tcxfilename,message
# Upload the TCX file to Strava and set the workout activity type # Upload the TCX file to Strava and set the workout activity type
# to rowing on Strava # to rowing on Strava