From 03e312dcb7de0da7a24a185150fd0870bc07e054 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 14 Sep 2011 01:50:18 +0200 Subject: [PATCH] use shutil.move() instead of os.rename() to avoid OSError: [Errno 18] Invalid cross-device link Signed-off-by: Nico Schottelius --- bin/cdist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist b/bin/cdist index 21a35c22..92161908 100755 --- a/bin/cdist +++ b/bin/cdist @@ -157,7 +157,7 @@ class Cdist: # Remove previous cache if os.path.exists(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): log.error(*args)