diff options
author | Evan Kaufman <evan.kaufman@gmail.com> | 2016-12-02 00:49:48 -0800 |
---|---|---|
committer | Toshio Kuratomi <a.badger@gmail.com> | 2017-03-28 07:52:02 -0700 |
commit | 30c0fd27cc0b8a003c60429aac403cb9bab4e9f2 (patch) | |
tree | b1b6de20b47843bd772e66b02897f93b09e0a971 | |
parent | 5546cdb453f10c2e5b3a83e8d5e30845427aa957 (diff) | |
download | ansible-modules-core-30c0fd27cc0b8a003c60429aac403cb9bab4e9f2.tar.gz |
Fix for python 2.4 compatibility (#5693)
Fixes #5692
(cherry picked from 580c74140a9d8109d4fa44e372895ea4e5ed4ee4)
-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 b7739a1c..a4784de2 100644 --- a/system/cron.py +++ b/system/cron.py @@ -668,8 +668,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(), |