From cb1edf3fb102f347adde2a1c8aec205c24cd36be Mon Sep 17 00:00:00 2001 From: emkael Date: Fri, 28 Sep 2018 14:31:35 +0200 Subject: Fixing carry-over fetch for a single-segment match if there's none --- jfr_playoff/matchinfo.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jfr_playoff/matchinfo.py b/jfr_playoff/matchinfo.py index f726282..d968a34 100644 --- a/jfr_playoff/matchinfo.py +++ b/jfr_playoff/matchinfo.py @@ -138,6 +138,9 @@ class MatchInfo: float(text.strip()) if len(text.strip()) > 0 else 0.0 for text in row.select('td.bdc')[0].contents if isinstance(text, unicode)] + if len(carry_over) < 2: + # no carry-over, possibly no carry-over cells or empty + carry_over = [0.0, 0.0] for i in range(0, 2): scores[i] += carry_over[i] team_names = [[text for text in link.contents -- cgit v1.2.3