database: skip games that lack a database member
This commit is contained in:
parent
e4b7809e34
commit
ea14f105d5
@ -71,7 +71,8 @@ class Data:
|
|||||||
games = Utils.get_all_titles()
|
games = Utils.get_all_titles()
|
||||||
for game_dir, game_mod in games.items():
|
for game_dir, game_mod in games.items():
|
||||||
try:
|
try:
|
||||||
title_db = game_mod.database(self.config)
|
if hasattr(game_mod, "database"):
|
||||||
|
game_mod.database(self.config)
|
||||||
metadata.create_all(self.__engine.connect())
|
metadata.create_all(self.__engine.connect())
|
||||||
|
|
||||||
self.base.set_schema_ver(
|
self.base.set_schema_ver(
|
||||||
@ -109,7 +110,8 @@ class Data:
|
|||||||
mod = importlib.import_module(f"titles.{dir}")
|
mod = importlib.import_module(f"titles.{dir}")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
title_db = mod.database(self.config)
|
if hasattr(mod, "database"):
|
||||||
|
mod.database(self.config)
|
||||||
metadata.drop_all(self.__engine.connect())
|
metadata.drop_all(self.__engine.connect())
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
Loading…
Reference in New Issue
Block a user