forked from ungleich-public/cdist
		
	:%s/self.out_path/self.base_path/g
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
This commit is contained in:
		
					parent
					
						
							
								8298bb0bf5
							
						
					
				
			
			
				commit
				
					
						a76d8bb517
					
				
			
		
					 1 changed files with 10 additions and 10 deletions
				
			
		| 
						 | 
					@ -43,16 +43,16 @@ class Local(object):
 | 
				
			||||||
                 target_host,
 | 
					                 target_host,
 | 
				
			||||||
                 exec_path=sys.argv[0],
 | 
					                 exec_path=sys.argv[0],
 | 
				
			||||||
                 initial_manifest=None,
 | 
					                 initial_manifest=None,
 | 
				
			||||||
                 out_path=None,
 | 
					                 base_path=None,
 | 
				
			||||||
                 add_conf_dirs=None):
 | 
					                 add_conf_dirs=None):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.target_host = target_host
 | 
					        self.target_host = target_host
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # FIXME: stopped: create base that does not require moving later
 | 
					        # FIXME: stopped: create base that does not require moving later
 | 
				
			||||||
        if out_path:
 | 
					        if base_path:
 | 
				
			||||||
            self.out_path = out_path
 | 
					            self.base_path = base_path
 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
            self.out_path = tempfile.mkdtemp()
 | 
					            self.base_path = tempfile.mkdtemp()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # FIXME: as well
 | 
					        # FIXME: as well
 | 
				
			||||||
        self._init_cache_dir(None)
 | 
					        self._init_cache_dir(None)
 | 
				
			||||||
| 
						 | 
					@ -88,10 +88,10 @@ class Local(object):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def _init_paths(self):
 | 
					    def _init_paths(self):
 | 
				
			||||||
        # Depending on out_path
 | 
					        # Depending on out_path
 | 
				
			||||||
        self.bin_path = os.path.join(self.out_path, "bin")
 | 
					        self.bin_path = os.path.join(self.base_path, "bin")
 | 
				
			||||||
        self.conf_path = os.path.join(self.out_path, "conf")
 | 
					        self.conf_path = os.path.join(self.base_path, "conf")
 | 
				
			||||||
        self.global_explorer_out_path = os.path.join(self.out_path, "explorer")
 | 
					        self.global_explorer_out_path = os.path.join(self.base_path, "explorer")
 | 
				
			||||||
        self.object_path = os.path.join(self.out_path, "object")
 | 
					        self.object_path = os.path.join(self.base_path, "object")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Depending on conf_path
 | 
					        # Depending on conf_path
 | 
				
			||||||
        self.global_explorer_path = os.path.join(self.conf_path, "explorer")
 | 
					        self.global_explorer_path = os.path.join(self.conf_path, "explorer")
 | 
				
			||||||
| 
						 | 
					@ -185,10 +185,10 @@ class Local(object):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def save_cache(self):
 | 
					    def save_cache(self):
 | 
				
			||||||
        destination = os.path.join(self.cache_path, self.target_host)
 | 
					        destination = os.path.join(self.cache_path, self.target_host)
 | 
				
			||||||
        self.log.debug("Saving " + self.out_path + " to " + destination)
 | 
					        self.log.debug("Saving " + self.base_path + " to " + destination)
 | 
				
			||||||
        if os.path.exists(destination):
 | 
					        if os.path.exists(destination):
 | 
				
			||||||
            shutil.rmtree(destination)
 | 
					            shutil.rmtree(destination)
 | 
				
			||||||
        shutil.move(self.out_path, destination)
 | 
					        shutil.move(self.base_path, destination)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def _create_conf_path_and_link_conf_dirs(self):
 | 
					    def _create_conf_path_and_link_conf_dirs(self):
 | 
				
			||||||
        # Link destination directories
 | 
					        # Link destination directories
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue