diff --git a/doc/dev/todo/steven b/doc/dev/todo/steven index 4b374a92..41941739 100644 --- a/doc/dev/todo/steven +++ b/doc/dev/todo/steven @@ -1,11 +1,4 @@ Object: - cdist_object.code_local_path - cdist_object.code_remote_path - cdist_object.remote_code_remote_path - - cdist_object.parameter_path - - Type: diff --git a/lib/cdist/core/object.py b/lib/cdist/core/object.py index 76f37487..2f1d93c4 100644 --- a/lib/cdist/core/object.py +++ b/lib/cdist/core/object.py @@ -69,7 +69,7 @@ class Object(object): self.object_id = object_id self.name = os.path.join(self.type.name, self.object_id) self.path = os.path.join(self.type.path, self.object_id) - self.absolute_path = os.path.join(self.base_path, self.path) + self.absolute_path = os.path.join(self.base_path, self.path, DOT_CDIST) self.code_local_path = os.path.join(self.path, "code-local") self.code_remote_path = os.path.join(self.path, "code-remote") self.parameter_path = os.path.join(self.path, "parameter") @@ -126,12 +126,12 @@ class Object(object): @property def changed(self): """Check whether the object has been changed.""" - return os.path.isfile(os.path.join(self.path, "changed")) + return os.path.isfile(os.path.join(self.absolute_path, "changed")) @changed.setter def changed(self, value): """Change the objects changed status.""" - path = os.path.join(self.path, "changed") + path = os.path.join(self.absolute_path, "changed") if value: open(path, "w").close() else: @@ -147,12 +147,12 @@ class Object(object): @property def prepared(self): """Check whether the object has been prepared.""" - return os.path.isfile(os.path.join(self.path, "prepared")) + return os.path.isfile(os.path.join(self.absolute_path, "prepared")) @prepared.setter def prepared(self, value): """Change the objects prepared status.""" - path = os.path.join(self.path, "prepared") + path = os.path.join(self.absolute_path, "prepared") if value: open(path, "w").close() else: @@ -168,12 +168,12 @@ class Object(object): @property def ran(self): """Check whether the object has been ran.""" - return os.path.isfile(os.path.join(self.path, "ran")) + return os.path.isfile(os.path.join(self.absolute_path, "ran")) @ran.setter def ran(self, value): """Change the objects ran status.""" - path = os.path.join(self.path, "ran") + path = os.path.join(self.absolute_path, "ran") if value: open(path, "w").close() else: