Add XBT exception handle

This commit is contained in:
Cal Corum 2023-10-30 21:19:47 -05:00
parent 46ec97e501
commit 3e54cdb297

View File

@ -473,7 +473,11 @@ def stealing_line(steal_data: dict):
def running(extra_base_pct: str):
if extra_base_pct == '':
return 8
xb_pct = float(extra_base_pct.strip("%")) / 100
try:
xb_pct = float(extra_base_pct.strip("%")) / 100
except Exception as e:
logging.error(f'calcs_batter running - {e}')
xb_pct = 20
return round(8 + (10 * xb_pct))