1
0
forked from Hay1tsme/artemis

database: skip games that lack a database member

This commit is contained in:
Hay1tsme 2023-03-12 00:26:48 -05:00
parent e4b7809e34
commit ea14f105d5

View File

@ -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: