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: Object:
cdist_object.code_local_path
cdist_object.code_remote_path
cdist_object.remote_code_remote_path
cdist_object.parameter_path
Type: Type:

View file

@ -69,7 +69,7 @@ class Object(object):
self.object_id = object_id self.object_id = object_id
self.name = os.path.join(self.type.name, self.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.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_local_path = os.path.join(self.path, "code-local")
self.code_remote_path = os.path.join(self.path, "code-remote") self.code_remote_path = os.path.join(self.path, "code-remote")
self.parameter_path = os.path.join(self.path, "parameter") self.parameter_path = os.path.join(self.path, "parameter")
@ -126,12 +126,12 @@ class Object(object):
@property @property
def changed(self): def changed(self):
"""Check whether the object has been changed.""" """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 @changed.setter
def changed(self, value): def changed(self, value):
"""Change the objects changed status.""" """Change the objects changed status."""
path = os.path.join(self.path, "changed") path = os.path.join(self.absolute_path, "changed")
if value: if value:
open(path, "w").close() open(path, "w").close()
else: else:
@ -147,12 +147,12 @@ class Object(object):
@property @property
def prepared(self): def prepared(self):
"""Check whether the object has been prepared.""" """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 @prepared.setter
def prepared(self, value): def prepared(self, value):
"""Change the objects prepared status.""" """Change the objects prepared status."""
path = os.path.join(self.path, "prepared") path = os.path.join(self.absolute_path, "prepared")
if value: if value:
open(path, "w").close() open(path, "w").close()
else: else:
@ -168,12 +168,12 @@ class Object(object):
@property @property
def ran(self): def ran(self):
"""Check whether the object has been ran.""" """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 @ran.setter
def ran(self, value): def ran(self, value):
"""Change the objects ran status.""" """Change the objects ran status."""
path = os.path.join(self.path, "ran") path = os.path.join(self.absolute_path, "ran")
if value: if value:
open(path, "w").close() open(path, "w").close()
else: else: