]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
Fix issue #6701. Use shutil.move instead of os.rename. 126/head
authorMark Kirkwood <mark.kirkwood@catalyst.net.nz>
Wed, 6 Nov 2013 02:15:12 +0000 (15:15 +1300)
committerMark Kirkwood <mark.kirkwood@catalyst.net.nz>
Wed, 6 Nov 2013 02:15:12 +0000 (15:15 +1300)
ceph_deploy/hosts/remotes.py

index 76789cf265a6f48806ceeb7de9fedb2b46076ab6..55d056493b2f37e8dddcfefe2a0f889672f8ead6 100644 (file)
@@ -1,6 +1,7 @@
 import errno
 import socket
 import os
+import shutil
 import tempfile
 import platform
 
@@ -50,7 +51,8 @@ def write_conf(cluster, conf, overwrite):
             if old != conf and not overwrite:
                 raise RuntimeError(err_msg)
         tmp_file.write(conf)
-        os.rename(tmp_file.name, path)
+        tmp_file.close()
+        shutil.move(tmp_file.name, path)
         return
     if os.path.exists('/etc/ceph'):
         with open(path, 'w') as f: