use absolute path for accessing file system
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
parent
600e7fb5b5
commit
79d0a18bb2
1 changed files with 6 additions and 6 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue