mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Improved fix for the newline at the end of crontabs
Fixes issue #15699 and improves PR #15771
This commit is contained in:
parent
67b13d9c05
commit
a71a8fb96d
@ -426,7 +426,7 @@ def file(name,
|
||||
with salt.utils.fopen(cron_path, 'w+') as fp_:
|
||||
raw_cron = __salt__['cron.raw_cron'](user)
|
||||
if not raw_cron.endswith('\n'):
|
||||
raw_cron = '{0}'.format(raw_cron)
|
||||
raw_cron = "{0}\n".format(raw_cron)
|
||||
fp_.write(raw_cron)
|
||||
|
||||
ret = {'changes': {},
|
||||
|
Loading…
Reference in New Issue
Block a user