From baa885f674ffbb91a9bd192d8943569d41bf561b Mon Sep 17 00:00:00 2001 From: Kevin Trocolli Date: Sat, 15 Apr 2023 00:12:45 -0400 Subject: [PATCH] Utils: exclude malformed game folders --- core/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/utils.py b/core/utils.py index d18289e..6bd5c08 100644 --- a/core/utils.py +++ b/core/utils.py @@ -16,7 +16,8 @@ class Utils: if not dir.startswith("__"): try: mod = importlib.import_module(f"titles.{dir}") - ret[dir] = mod + if hasattr(mod, "game_codes") and hasattr(mod, "index"): # Minimum required to function + ret[dir] = mod except ImportError as e: logging.getLogger("core").error(f"get_all_titles: {dir} - {e}")