summaryrefslogtreecommitdiffstats
path: root/nova/loadables.py
diff options
context:
space:
mode:
authorVishvananda Ishaya <vishvananda@gmail.com>2012-12-28 11:42:17 -0800
committerVishvananda Ishaya <vishvananda@gmail.com>2012-12-28 11:42:17 -0800
commite9e037920d5140ce60348a54b070bba48da9cef7 (patch)
treed2cbd498f7dba81b25535368820984139b31cb66 /nova/loadables.py
parentab135433464865f6612f4b543157d62c05d2fb13 (diff)
downloadnova-e9e037920d5140ce60348a54b070bba48da9cef7.tar.gz
nova-e9e037920d5140ce60348a54b070bba48da9cef7.tar.xz
nova-e9e037920d5140ce60348a54b070bba48da9cef7.zip
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
Diffstat (limited to 'nova/loadables.py')
-rw-r--r--nova/loadables.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/loadables.py b/nova/loadables.py
index 0c930267e..964845184 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