summaryrefslogtreecommitdiff
path: root/jfr_playoff/data/tournament/jfrdb.py
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2019-12-30 15:03:56 +0100
committeremkael <emkael@tlen.pl>2019-12-30 15:46:42 +0100
commit5e66c1684a8a2b0597fc2633078c23e212cce228 (patch)
treeaceb836619e4cde2f71cae5a71e27899f9b3a7cf /jfr_playoff/data/tournament/jfrdb.py
parent9e29356e95c06907ace1239b1367b134155d3167 (diff)
Auto-loading tournament result info client classes
Diffstat (limited to 'jfr_playoff/data/tournament/jfrdb.py')
-rw-r--r--jfr_playoff/data/tournament/jfrdb.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/jfr_playoff/data/tournament/jfrdb.py b/jfr_playoff/data/tournament/jfrdb.py
index 48645df..6317a79 100644
--- a/jfr_playoff/data/tournament/jfrdb.py
+++ b/jfr_playoff/data/tournament/jfrdb.py
@@ -1,5 +1,4 @@
import jfr_playoff.sql as p_sql
-
from jfr_playoff.logger import PlayoffLogger
from jfr_playoff.data.tournament import TournamentInfoClient
@@ -9,6 +8,13 @@ SWISS_TIE_WARNING = 'tie detected in swiss %s.' + \
class JFRDbTournamentInfo(TournamentInfoClient):
+ @property
+ def priority(self):
+ return 50
+
+ def is_capable(self):
+ return (self.database is not None) and ('database' in self.settings)
+
def get_exceptions(self, method):
return (IOError, TypeError, IndexError, KeyError)