From: Alfredo Deza Date: Tue, 19 Nov 2013 20:54:01 +0000 (-0500) Subject: make sure the tmp file is closed before moving X-Git-Tag: v1.3.3~8^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F137%2Fhead;p=ceph-deploy.git make sure the tmp file is closed before moving Signed-off-by: Alfredo Deza --- diff --git a/ceph_deploy/hosts/remotes.py b/ceph_deploy/hosts/remotes.py index 0c17e61..b5e0420 100644 --- a/ceph_deploy/hosts/remotes.py +++ b/ceph_deploy/hosts/remotes.py @@ -71,6 +71,7 @@ def write_keyring(path, key): """ create a keyring file """ tmp_file = tempfile.NamedTemporaryFile(delete=False) tmp_file.write(key) + tmp_file.close() shutil.move(tmp_file.name, path)