mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 11:51:26 -07:00
Strip only newlines and carriage returns. Instead of stripping ALL whitespace, which may have unintended side effects
This commit is contained in:
parent
766413e79d
commit
3a44d60fbc
1 changed files with 3 additions and 0 deletions
|
@ -383,6 +383,9 @@ class CronTab(object):
|
||||||
return []
|
return []
|
||||||
|
|
||||||
def get_cron_job(self,minute,hour,day,month,weekday,job,special,disabled):
|
def get_cron_job(self,minute,hour,day,month,weekday,job,special,disabled):
|
||||||
|
# normalize any leading/trailing newlines (ansible/ansible-modules-core#3791)
|
||||||
|
job = job.strip('\r\n')
|
||||||
|
|
||||||
if disabled:
|
if disabled:
|
||||||
disable_prefix = '#'
|
disable_prefix = '#'
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue