diff options
author | Evan Kaufman <evan.kaufman@gmail.com> | 2016-12-02 00:49:48 -0800 |
---|---|---|
committer | John R Barker <john@johnrbarker.com> | 2016-12-02 08:49:48 +0000 |
commit | cdb6a61f0da4a67e58704ab1ccdb6e1d0877148a (patch) | |
tree | 47212ce8a313f59ff56d7337275864d6f9acc655 | |
parent | b58312f08f08628d0aeb80bb1696c249013fa440 (diff) | |
download | ansible-modules-core-cdb6a61f0da4a67e58704ab1ccdb6e1d0877148a.tar.gz |
Fix for python 2.4 compatibility (#5693)
Fixes #5692
-rw-r--r-- | system/cron.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/system/cron.py b/system/cron.py index b747a8cf..34307c6b 100644 --- a/system/cron.py +++ b/system/cron.py @@ -727,8 +727,9 @@ def main(): changed = True # no changes to env/job, but existing crontab needs a terminating newline - if not changed and not crontab.existing.endswith(('\r', '\n')): - changed = True + if not changed: + if not (crontab.existing.endswith('\r') or crontab.existing.endswith('\n')): + changed = True res_args = dict( jobs = crontab.get_jobnames(), |