AutoWorld: don't import __pycache__

This commit is contained in:
Fabian Dill 2022-04-04 10:29:55 +02:00 committed by Fabian Dill
parent 2f7f6a0b58
commit 7315da2ccb
1 changed files with 2 additions and 1 deletions

View File

@ -13,6 +13,7 @@ for file in os.scandir(os.path.dirname(__file__)):
world_folders.append(file.name) world_folders.append(file.name)
world_folders.sort() world_folders.sort()
for world in world_folders: for world in world_folders:
if not world.startswith("_"): # prevent explicitly loading __pycache__ and allow _* names for non-world folders
importlib.import_module(f".{world}", "worlds") importlib.import_module(f".{world}", "worlds")
from .AutoWorld import AutoWorldRegister from .AutoWorld import AutoWorldRegister