diff options
author | emkael <emkael@tlen.pl> | 2018-09-28 17:37:16 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2018-09-28 17:37:16 +0200 |
commit | 72e52cf8c572f262d022acaa1eb1aa65bccb099e (patch) | |
tree | ae22e9f6cd22bd673da56c8111912e0b37f4209d /jfr_playoff/tournamentinfo.py | |
parent | f5ac370c094ae393dc0348bbbf31bef1fe9a7208 (diff) |
Refactoring of some config dictionary default value fetches
Diffstat (limited to 'jfr_playoff/tournamentinfo.py')
-rw-r--r-- | jfr_playoff/tournamentinfo.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/jfr_playoff/tournamentinfo.py b/jfr_playoff/tournamentinfo.py index a646d4e..45a7752 100644 --- a/jfr_playoff/tournamentinfo.py +++ b/jfr_playoff/tournamentinfo.py @@ -169,11 +169,12 @@ class TournamentInfo: PlayoffLogger.get('tournamentinfo').warning( 'cannot determine tournament results from HTML: %s(%s)', type(e).__name__, str(e)) - if self.is_finished() and 'final_positions' in self.settings: + if self.is_finished(): + final_positions = self.settings.get('final_positions', []) PlayoffLogger.get('tournamentinfo').info( 'setting final positions from tournament results: %s', - self.settings['final_positions']) - for position in self.settings['final_positions']: + final_positions) + for position in final_positions: if len(teams) >= position: teams[position-1].append(position) return teams |