diff --git a/src/spiffworkflow_proxy/plugin_service.py b/src/spiffworkflow_proxy/plugin_service.py index 3a370e1..cbcef99 100644 --- a/src/spiffworkflow_proxy/plugin_service.py +++ b/src/spiffworkflow_proxy/plugin_service.py @@ -83,8 +83,8 @@ def modules_for_plugin_in_package( ) -> Generator[tuple[str, types.ModuleType], None, None]: for finder, name, ispkg in pkgutil.iter_modules(plugin.__path__): if ispkg and name == package_name: - imported = importlib.import_module(f"{plugin.__name__}.{name}") - yield from PluginService.modules_for_plugin_in_package(imported, None) + sub_pkg = importlib.import_module(f"{plugin.__name__}.{name}") + yield from PluginService.modules_for_plugin_in_package(sub_pkg, None) elif not package_name: spec = finder.find_spec(name) # type: ignore if spec is not None and spec.loader is not None: