From e9e037920d5140ce60348a54b070bba48da9cef7 Mon Sep 17 00:00:00 2001 From: Vishvananda Ishaya Date: Fri, 28 Dec 2012 11:42:17 -0800 Subject: [PATCH] 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 --- nova/loadables.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nova/loadables.py b/nova/loadables.py index 0c930267ef3b..964845184a5b 100644 --- a/nova/loadables.py +++ b/nova/loadables.py @@ -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