Merge remote-tracking branch 'steven/master'

This commit is contained in:
Nico Schottelius 2011-10-07 16:45:00 +02:00
commit 10c083894c
2 changed files with 7 additions and 14 deletions

View File

@ -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:

View File

@ -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: