don't refer to vars which don't exist

This commit is contained in:
Seth Vidal 2013-04-16 18:11:58 +00:00
parent 6d4f35c721
commit 93ab6e8e6f

View file

@ -146,9 +146,9 @@ def get_jobs_file(module, user, tmpfile, cron_file):
def install_jobs(module, user, tmpfile, cron_file):
if cron_file:
dest_tmp = "%s.%s.%s.tmp" % (dest,os.getpid(),time.time())
dest_tmp = "%s.%s.%s.tmp" % (cron_file,os.getpid(),time.time())
shutil.copyfile(tmpfile, dest_tmp)
module.atomic_replace(dest_tmp, dest)
module.atomic_replace(dest_tmp, cron_file)
else:
cmd = "crontab %s %s" % (user, tmpfile)