bugfix: use absolute path to when accessing file sytem (unittest discoverd :-)

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
Steven Armstrong 2011-10-10 09:48:19 +02:00
parent abf318ae90
commit 96ca5b6988

View file

@ -114,7 +114,7 @@ class Object(object):
@property
def parameters(self):
if not self.__parameters:
self.__parameters = cdist.core.property.DirectoryDict(os.path.join(self.path, "parameter"))
self.__parameters = cdist.core.property.DirectoryDict(os.path.join(self.absolute_path, "parameter"))
return self.__parameters
@parameters.setter
@ -122,7 +122,7 @@ class Object(object):
if isinstance(value, cdist.core.property.DirectoryDict):
self.__parameters = value
else:
self.__parameters = cdist.core.property.DirectoryDict(os.path.join(self.path, "parameter"), value)
self.__parameters = cdist.core.property.DirectoryDict(os.path.join(self.absolute_path, "parameter"), value)
### /parameters