diff options
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/utils.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py index 5f5767c1da..fab16ffc58 100644 --- a/bitbake/lib/bb/utils.py +++ b/bitbake/lib/bb/utils.py | |||
@@ -16,7 +16,8 @@ import bb.msg | |||
16 | import multiprocessing | 16 | import multiprocessing |
17 | import fcntl | 17 | import fcntl |
18 | import importlib | 18 | import importlib |
19 | from importlib import machinery | 19 | import importlib.machinery |
20 | import importlib.util | ||
20 | import itertools | 21 | import itertools |
21 | import subprocess | 22 | import subprocess |
22 | import glob | 23 | import glob |
@@ -1584,7 +1585,9 @@ def load_plugins(logger, plugins, pluginpath): | |||
1584 | logger.debug(1, 'Loading plugin %s' % name) | 1585 | logger.debug(1, 'Loading plugin %s' % name) |
1585 | spec = importlib.machinery.PathFinder.find_spec(name, path=[pluginpath] ) | 1586 | spec = importlib.machinery.PathFinder.find_spec(name, path=[pluginpath] ) |
1586 | if spec: | 1587 | if spec: |
1587 | return spec.loader.load_module() | 1588 | mod = importlib.util.module_from_spec(spec) |
1589 | spec.loader.exec_module(mod) | ||
1590 | return mod | ||
1588 | 1591 | ||
1589 | logger.debug(1, 'Loading plugins from %s...' % pluginpath) | 1592 | logger.debug(1, 'Loading plugins from %s...' % pluginpath) |
1590 | 1593 | ||