From ea14f105d597b0150146bc12445a89a8a969fa4b Mon Sep 17 00:00:00 2001 From: Kevin Trocolli Date: Sun, 12 Mar 2023 00:26:48 -0500 Subject: [PATCH] database: skip games that lack a database member --- core/data/database.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/data/database.py b/core/data/database.py index 1af5c08..715bac6 100644 --- a/core/data/database.py +++ b/core/data/database.py @@ -71,7 +71,8 @@ class Data: games = Utils.get_all_titles() for game_dir, game_mod in games.items(): try: - title_db = game_mod.database(self.config) + if hasattr(game_mod, "database"): + game_mod.database(self.config) metadata.create_all(self.__engine.connect()) self.base.set_schema_ver( @@ -109,7 +110,8 @@ class Data: mod = importlib.import_module(f"titles.{dir}") try: - title_db = mod.database(self.config) + if hasattr(mod, "database"): + mod.database(self.config) metadata.drop_all(self.__engine.connect()) except Exception as e: