more try except in c2stuff - bugfix
This commit is contained in:
@@ -220,11 +220,18 @@ def summaryfromsplitdata(splitdata,data,filename,sep='|'):
|
||||
velo = totaldist/totaltime
|
||||
avgpower = 2.8*velo**(3.0)
|
||||
|
||||
restvelo = restdistance/resttime
|
||||
try:
|
||||
restvelo = restdistance/resttime
|
||||
except (ZeroDivisionError,OverflowError):
|
||||
restvelo = 0
|
||||
|
||||
restpower = 2.8*restvelo**(3.0)
|
||||
|
||||
avgdps = totaldist/data['stroke_count']
|
||||
|
||||
|
||||
try:
|
||||
avgdps = totaldist/data['stroke_count']
|
||||
except (ZeroDivisionError,OverflowError):
|
||||
avgdps = 0
|
||||
|
||||
from rowingdata import summarystring,workstring,interval_string
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user