bugfix: use absolute path when accessing file system

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
Steven Armstrong 2011-10-10 10:01:28 +02:00
parent b1efc27b39
commit 86f976976e

View file

@ -98,7 +98,7 @@ class Object(object):
@property
def requirements(self):
if not self.__requirements:
self.__requirements = cdist.core.property.FileList(os.path.join(self.path, "require"))
self.__requirements = cdist.core.property.FileList(os.path.join(self.absolute_path, "require"))
return self.__requirements
@requirements.setter
@ -106,7 +106,7 @@ class Object(object):
if isinstance(value, cdist.core.property.FileList):
self.__requirements = value
else:
self.__requirements = cdist.core.property.FileList(os.path.join(self.path, "require"), value)
self.__requirements = cdist.core.property.FileList(os.path.join(self.absolute_path, "require"), value)
### /requirements