diff options
author | emkael <emkael@tlen.pl> | 2018-09-28 14:31:35 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2018-09-28 14:31:35 +0200 |
commit | cb1edf3fb102f347adde2a1c8aec205c24cd36be (patch) | |
tree | 2fe4f3c56df46716bfc727e06010d1e5658fb6f1 /jfr_playoff/matchinfo.py | |
parent | b1ce81da1478715b1d3a8dd6883c5655db0a8f68 (diff) |
Fixing carry-over fetch for a single-segment match if there's none
Diffstat (limited to 'jfr_playoff/matchinfo.py')
-rw-r--r-- | jfr_playoff/matchinfo.py | 3 |
1 files changed, 3 insertions, 0 deletions
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 |