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:
Vishvananda Ishaya 2012-12-28 11:42:17 -08:00
parent ab13543346
commit e9e037920d
1 changed files with 1 additions and 1 deletions

View File

@ -49,7 +49,7 @@ from nova.openstack.common import importutils
class BaseLoader(object):
def __init__(self, loadable_cls_type):
mod = sys.modules[self.__class__.__module__]
self.path = mod.__path__[0]
self.path = os.path.abspath(mod.__path__[0])
self.package = mod.__package__
self.loadable_cls_type = loadable_cls_type