switched off error catching in stravaworkoutdata
This commit is contained in:
@@ -247,26 +247,23 @@ def get_strava_workout(user,stravaid):
|
||||
# Generate Workout data for Strava (a TCX file)
|
||||
def createstravaworkoutdata(w):
|
||||
filename = w.csvfilename
|
||||
try:
|
||||
row = rowingdata(filename)
|
||||
tcxfilename = filename[:-4]+'.tcx'
|
||||
row.exporttotcx(tcxfilename,notes=w.notes+'\n from '+w.workoutsource+' via rowsandall.com')
|
||||
gzfilename = tcxfilename+'.gz'
|
||||
with file(tcxfilename,'rb') as inF:
|
||||
s = inF.read()
|
||||
with gzip.GzipFile(gzfilename,'wb') as outF:
|
||||
outF.write(s)
|
||||
try:
|
||||
os.remove(tcxfilename)
|
||||
except WindowError:
|
||||
pass
|
||||
|
||||
return gzfilename,""
|
||||
except:
|
||||
message = "createstravaworkoutdata "+str(sys.exc_info()[0])
|
||||
tcxfilename = 0
|
||||
|
||||
return tcxfilename,message
|
||||
row = rowingdata(filename)
|
||||
tcxfilename = filename[:-4]+'.tcx'
|
||||
row.exporttotcx(tcxfilename,notes=w.notes+'\n from '+w.workoutsource+' via rowsandall.com')
|
||||
gzfilename = tcxfilename+'.gz'
|
||||
with file(tcxfilename,'rb') as inF:
|
||||
s = inF.read()
|
||||
with gzip.GzipFile(gzfilename,'wb') as outF:
|
||||
outF.write(s)
|
||||
|
||||
try:
|
||||
os.remove(tcxfilename)
|
||||
except WindowError:
|
||||
pass
|
||||
|
||||
return gzfilename,""
|
||||
|
||||
|
||||
# Upload the TCX file to Strava and set the workout activity type
|
||||
# to rowing on Strava
|
||||
|
||||
Reference in New Issue
Block a user