Commit 5f1e2afc by Michael DeHaan

Revert "make atomic_replace use shutil.copy2 instead of os.rename() so it will…

Revert "make atomic_replace use shutil.copy2 instead of os.rename() so it will work across filesystems".

AR function was leaving some tmp files behind, want to revert, will have better implementation soon, this is the old way now.

This reverts commit f74a1fa4.
parent 3238d094
......@@ -797,11 +797,7 @@ class AnsibleModule(object):
if self.selinux_enabled():
context = self.selinux_default_context(dest)
self.set_context_if_different(src, context, False)
try:
shutil.copy2(src, dest)
except shutil.Error, e:
self.fail_json(msg='Could not atomic_replace file: %s to %s: %s' % (src, dest, e))
os.rename(src, dest)
def run_command(self, args, check_rc=False, close_fds=False, executable=None, data=None):
'''
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment