mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Only insert enabled if it's a dict
This commit is contained in:
parent
5b49f41fab
commit
087a8dc3c2
1 changed files with 5 additions and 5 deletions
|
@ -185,11 +185,11 @@ def present(name,
|
|||
ret['comment'] = new_item['comment']
|
||||
return ret
|
||||
|
||||
# The schedule.list gives us an item that is guaranteed to have an
|
||||
# 'enabled' argument. Before comparing, add 'enabled' if it's not
|
||||
# available (assume True, like schedule.list does)
|
||||
if 'enabled' not in new_item:
|
||||
new_item['enabled'] = True
|
||||
# The schedule.list gives us an item that is guaranteed to have an
|
||||
# 'enabled' argument. Before comparing, add 'enabled' if it's not
|
||||
# available (assume True, like schedule.list does)
|
||||
if 'enabled' not in new_item:
|
||||
new_item['enabled'] = True
|
||||
|
||||
if new_item == current_schedule[name]:
|
||||
ret['comment'].append('Job {0} in correct state'.format(name))
|
||||
|
|
Loading…
Add table
Reference in a new issue