error catching around non painsled parsers
This commit is contained in:
@@ -610,7 +610,15 @@ def new_workout_from_file(r,f2,
|
|||||||
|
|
||||||
# handle non-Painsled by converting it to painsled compatible CSV
|
# handle non-Painsled by converting it to painsled compatible CSV
|
||||||
if (fileformat != 'csv'):
|
if (fileformat != 'csv'):
|
||||||
f2,summary,oarlength,inboard = handle_nonpainsled(f2,fileformat,summary=summary)
|
try:
|
||||||
|
f2,summary,oarlength,inboard = handle_nonpainsled(f2,
|
||||||
|
fileformat,
|
||||||
|
summary=summary)
|
||||||
|
except:
|
||||||
|
errorstring = str(sys.exc_info()[0])
|
||||||
|
message = 'Something went wrong: '+errorstring
|
||||||
|
return (0,message,'')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
dosummary = (fileformat != 'fit')
|
dosummary = (fileformat != 'fit')
|
||||||
|
|||||||
@@ -5132,10 +5132,10 @@ def workout_upload_view(request,message="",
|
|||||||
f2 = res[1] # file name incl media directory
|
f2 = res[1] # file name incl media directory
|
||||||
|
|
||||||
|
|
||||||
id,message,f2 = dataprep.new_workout_from_file(r,f2,
|
id,message,f2 = dataprep.new_workout_from_file(r,f2,
|
||||||
workouttype=workouttype,
|
workouttype=workouttype,
|
||||||
makeprivate=makeprivate,
|
makeprivate=makeprivate,
|
||||||
title = t,
|
title = t,
|
||||||
notes='')
|
notes='')
|
||||||
if not id:
|
if not id:
|
||||||
url = reverse(workout_upload_view,
|
url = reverse(workout_upload_view,
|
||||||
|
|||||||
Reference in New Issue
Block a user