mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #27585 from lyft/cron-fix
Fix undefined variable in cron state module
This commit is contained in:
commit
9805bdeddf
1 changed files with 2 additions and 1 deletions
|
@ -528,10 +528,11 @@ def file(name,
|
|||
ret['changes'] = {'diff': ret['changes']['diff']}
|
||||
ret['comment'] = 'Crontab for user {0} was updated'.format(user)
|
||||
elif ret['result']:
|
||||
cron_ret = None
|
||||
ret['comment'] = 'Crontab for user {0} is in the correct ' \
|
||||
'state'.format(user)
|
||||
|
||||
if cron_ret['retcode']:
|
||||
if cron_ret and cron_ret['retcode']:
|
||||
ret['comment'] = 'Unable to update user {0} crontab {1}.' \
|
||||
' Error: {2}'.format(user, cron_path, cron_ret['stderr'])
|
||||
ret['result'] = False
|
||||
|
|
Loading…
Add table
Reference in a new issue