]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
use shutil.move instead of os.rename 134/head
authorncanceill <nicolas.canceill@ens-cachan.org>
Mon, 18 Nov 2013 11:08:15 +0000 (12:08 +0100)
committerncanceill <nicolas.canceill@ens-cachan.org>
Mon, 18 Nov 2013 11:08:15 +0000 (12:08 +0100)
ceph_deploy/hosts/remotes.py

index 62766f7720b544ab73e9b6d8da086af201a3927b..40962e0e8d8fc72fde98e047a188aced50042fa7 100644 (file)
@@ -66,7 +66,7 @@ def write_keyring(path, key):
     """ create a keyring file """
     tmp_file = tempfile.NamedTemporaryFile(delete=False)
     tmp_file.write(key)
-    os.rename(tmp_file.name, path)
+    shutil.move(tmp_file.name, path)
 
 
 def create_mon_path(path):
@@ -150,7 +150,7 @@ def make_mon_removed_dir(path, file_name):
     except OSError, e:
         if e.errno != errno.EEXIST:
             raise
-    os.rename(path, os.path.join('/var/lib/ceph/mon-removed/', file_name))
+    shutil.move(path, os.path.join('/var/lib/ceph/mon-removed/', file_name))
 
 
 def safe_mkdir(path):