From b9c1d6e081b031634944552b82221294754d21b3 Mon Sep 17 00:00:00 2001 From: emkael Date: Sun, 2 Jun 2019 23:55:51 +0200 Subject: Error-proof DB configuration on team list fetch --- jfr_playoff/gui/tabs.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'jfr_playoff/gui') 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( '<>', when='tail') -- cgit v1.2.3