cron: Work even without initial crontab

Fixes #2165.
This commit is contained in:
Daniel Hokka Zakrisson 2013-02-21 21:14:29 +01:00
parent 2416b04f5e
commit d5a236c53d

5
cron
View file

@ -333,12 +333,9 @@ def main():
os.unlink(backupfile) os.unlink(backupfile)
module.exit_json(changed=changed,cron_file=cron_file,state=state) module.exit_json(changed=changed,cron_file=cron_file,state=state)
if (rc != 0):
module.fail_json(msg=err)
if changed: if changed:
# If the file is empty - remove it # If the file is empty - remove it
if rm: if rm and cron_file:
remove_job_file(cron_file) remove_job_file(cron_file)
else: else:
if backup: if backup: