summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2018-02-17 14:10:25 +0100
committeremkael <emkael@tlen.pl>2018-02-17 14:10:25 +0100
commit8b319533f6ad8e3fcfe548ae0b6ca6278b0daf9c (patch)
treeabbfd6ad58bf8a16d16195a28b522ed11744685f
parent3597b34fd1befdeeeba06f8b36908430daf23194 (diff)
Ability to indicate the state (board count) of a manually defined match
Fixes #8 Fixes #9
-rw-r--r--jfr_playoff/matchinfo.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/jfr_playoff/matchinfo.py b/jfr_playoff/matchinfo.py
index 7141113..9473238 100644
--- a/jfr_playoff/matchinfo.py
+++ b/jfr_playoff/matchinfo.py
@@ -121,7 +121,10 @@ class MatchInfo:
(scores_fetched, teams_fetched,
self.info.teams) = self.__get_predefined_scores()
if scores_fetched:
- self.info.running = -1
+ if 'running' in self.config:
+ self.info.running = int(self.config['running'])
+ else:
+ self.info.running = -1
if not teams_fetched:
try:
self.info.teams = self.__get_db_teams(self.info.teams, not scores_fetched)
@@ -155,8 +158,6 @@ class MatchInfo:
self.info.running = -1 \
if boards_played >= boards_to_play \
else boards_played
- else:
- self.info.running = 0
def __determine_outcome(self):