forked from ungleich-public/cdist
		
	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
 | 
					    @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:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue