use shutil.move() instead of os.rename() to avoid OSError: [Errno 18] Invalid cross-device link
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
		
					parent
					
						
							
								9b3a95e244
							
						
					
				
			
			
				commit
				
					
						03e312dcb7
					
				
			
		
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -157,7 +157,7 @@ class Cdist:
 | 
				
			||||||
      # Remove previous cache
 | 
					      # Remove previous cache
 | 
				
			||||||
      if os.path.exists(self.cache_dir):
 | 
					      if os.path.exists(self.cache_dir):
 | 
				
			||||||
         shutil.rmtree(self.cache_dir)
 | 
					         shutil.rmtree(self.cache_dir)
 | 
				
			||||||
      os.rename(self.temp_dir, self.cache_dir)
 | 
					      shutil.move(self.temp_dir, self.cache_dir)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   def exit_error(self, *args):
 | 
					   def exit_error(self, *args):
 | 
				
			||||||
      log.error(*args)
 | 
					      log.error(*args)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue