diff options
| author | Seth Vidal <skvidal@fedoraproject.org> | 2013-04-16 18:41:34 +0000 |
|---|---|---|
| committer | Seth Vidal <skvidal@fedoraproject.org> | 2013-04-16 18:41:34 +0000 |
| commit | 6fcd81fff62e5fe68a1e11f4eff1ffec1b288546 (patch) | |
| tree | b52c92abbe6657999e28e50af9c5f719b01b0064 /library | |
| parent | 645a7c7bd8d9ca5aa878a2ad0417fe409b984868 (diff) | |
| download | ansible-6fcd81fff62e5fe68a1e11f4eff1ffec1b288546.tar.gz ansible-6fcd81fff62e5fe68a1e11f4eff1ffec1b288546.tar.xz ansible-6fcd81fff62e5fe68a1e11f4eff1ffec1b288546.zip | |
take out unnecessary copy
Diffstat (limited to 'library')
| -rwxr-xr-x | library/cron | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/library/cron b/library/cron index 2a6fbed2a..a5d8ba536 100755 --- a/library/cron +++ b/library/cron @@ -147,10 +147,8 @@ def get_jobs_file(module, user, tmpfile, cron_file): def install_jobs(module, user, tmpfile, cron_file): cron_file = '/etc/cron.d/%s' % cron_file if cron_file: - dest_tmp = "%s.%s.%s.tmp" % (cron_file,os.getpid(),time.time()) try: - shutil.copyfile(tmpfile, dest_tmp) - module.atomic_replace(dest_tmp, cron_file) + module.atomic_replace(tmpfile, cron_file) except (OSError, IOError), e: return (1, "", str(e)) except: |
