Add python 2.7 comment

Change-Id: Ie4183da314bd7ca0719f45f0d9b3c26f8707e266
This commit is contained in:
Sean Dague 2016-01-04 12:31:15 +00:00
parent 48c9a91de6
commit f9f9a4654c
1 changed files with 1 additions and 0 deletions

View File

@ -741,6 +741,7 @@ def discover_extensions(version):
def _discover_via_python_path():
for (module_loader, name, _ispkg) in pkgutil.iter_modules():
if name.endswith('_python_novaclient_ext'):
# NOTE(sdague): needed for python 2.x compatibility.
if not hasattr(module_loader, 'load_module'):
module_loader = module_loader.find_module(name)
module = module_loader.load_module(name)