mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
When looping through the schedule to remove hidden attributes, we should only do that if the item in question is a dictionary. It could be the attribute that determines if the entire scheudle is enabled or disable.
This commit is contained in:
parent
fdb13a3a91
commit
1c6d4fbc74
1 changed files with 4 additions and 3 deletions
|
@ -160,9 +160,10 @@ class Schedule(object):
|
|||
if remove_hidden:
|
||||
_schedule = copy.deepcopy(schedule)
|
||||
for job in _schedule:
|
||||
for item in _schedule[job]:
|
||||
if item.startswith('_'):
|
||||
del schedule[job][item]
|
||||
if isinstance(_schedule[job], dict):
|
||||
for item in _schedule[job]:
|
||||
if item.startswith('_'):
|
||||
del schedule[job][item]
|
||||
return schedule
|
||||
|
||||
def _check_max_running(self, func, data, opts):
|
||||
|
|
Loading…
Add table
Reference in a new issue