Fix extension loading from python path
Commit 3502a5591a
broke extension loading
from pythonpath. Incompatible on python3.6.8, python3.8, python3.9. Put
it back.
Closes-Bug: #1980184
Change-Id: I5b67c93e3c789252d9bd35ee69dddbe1b556dec4
This commit is contained in:
parent
2c7d463f37
commit
1f3b663485
|
@ -797,6 +797,8 @@ def discover_extensions(version):
|
|||
def _discover_via_python_path():
|
||||
for (module_loader, name, ispkg) in pkgutil.iter_modules():
|
||||
if name.endswith('cinderclient_ext'):
|
||||
if not hasattr(module_loader, 'load_module'):
|
||||
module_loader = module_loader.find_module(name)
|
||||
module = module_loader.load_module(name)
|
||||
yield name, module
|
||||
|
||||
|
|
Loading…
Reference in New Issue