1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-09-08 05:58:43 +02:00

commandline: Do not recurse into subdirs when loading plugins

This commit is contained in:
2023-04-05 15:54:20 +02:00
parent 497f4db18b
commit baca98abbb

View File

@@ -264,7 +264,7 @@ class MainCommand(Command):
if module_path not in sys.path:
sys.path.append(module_path)
for loader, module_name, _ in pkgutil.walk_packages(path=[module_path]):
for loader, module_name, _ in pkgutil.iter_modules(path=[module_path]):
full_name = f"{module_prefix}.{module_name}"
spec = loader.find_spec(full_name)
mod = importlib.util.module_from_spec(spec)