Skip to content

Commit 99434d4

Browse files
fix(plugin): add exec_module to execute to module code (#377)
1 parent 6ff93cb commit 99434d4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

skywalking/plugins/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ def install():
5959
if sys.version_info < (3, 12):
6060
plugin = importer.find_module(modname).load_module(modname)
6161
else:
62-
plugin = importlib.util.module_from_spec(importer.find_spec(modname))
62+
spec = importer.find_spec(modname)
63+
plugin = importlib.util.module_from_spec(spec)
64+
spec.loader.exec_module(plugin)
6365

6466
# todo: refactor the version checker, currently it doesn't really work as intended
6567
supported = pkg_version_check(plugin)

0 commit comments

Comments
 (0)