Make sure the loadables path is the absolute path
the __path__ of a module can be a relative path in some install scenarios (i.e. setup.py develop on osx), so normalize it to an absolute path since we expect an absolute path in the tests. Change-Id: Id40889229f5735a292899dfee2c8595fdbf0dfff
This commit is contained in:
parent
ab13543346
commit
e9e037920d
|
@ -49,7 +49,7 @@ from nova.openstack.common import importutils
|
||||||
class BaseLoader(object):
|
class BaseLoader(object):
|
||||||
def __init__(self, loadable_cls_type):
|
def __init__(self, loadable_cls_type):
|
||||||
mod = sys.modules[self.__class__.__module__]
|
mod = sys.modules[self.__class__.__module__]
|
||||||
self.path = mod.__path__[0]
|
self.path = os.path.abspath(mod.__path__[0])
|
||||||
self.package = mod.__package__
|
self.package = mod.__package__
|
||||||
self.loadable_cls_type = loadable_cls_type
|
self.loadable_cls_type = loadable_cls_type
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue