summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2019-06-02 23:55:51 +0200
committeremkael <emkael@tlen.pl>2019-06-02 23:55:51 +0200
commitb9c1d6e081b031634944552b82221294754d21b3 (patch)
treefda5e849f697736f4bc3c5c8880b5e724f4b38cd
parentd6692ee021a2c8c2b73b327aefaf43e139346e9c (diff)
Error-proof DB configuration on team list fetch
-rw-r--r--jfr_playoff/gui/tabs.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/jfr_playoff/gui/tabs.py b/jfr_playoff/gui/tabs.py
index 7cb908a..619da8d 100644
--- a/jfr_playoff/gui/tabs.py
+++ b/jfr_playoff/gui/tabs.py
@@ -134,9 +134,12 @@ class TeamsTab(PlayoffTab):
if dbConfig is not None:
config['database'] = dbConfig
data = PlayoffData()
- self._teamList = data.fetch_team_list(
- config['teams'],
- PlayoffDB(dbConfig) if dbConfig is not None else None)
+ db = None
+ try:
+ db = PlayoffDB(dbConfig)
+ except Exception:
+ pass
+ self._teamList = data.fetch_team_list(config['teams'], db)
self.winfo_toplevel().event_generate(
'<<TeamListChanged>>', when='tail')