mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
backporting a fix from develop where the use of splay would result in seconds=0 in the schedule.list when there was no seconds specified in the origina schedule
This commit is contained in:
parent
f63566e452
commit
7fa5d809d2
1 changed files with 10 additions and 1 deletions
|
@ -112,7 +112,16 @@ def list_(show_all=False, where=None, return_yaml=True):
|
|||
schedule[job][item] = False
|
||||
|
||||
if '_seconds' in schedule[job]:
|
||||
schedule[job]['seconds'] = schedule[job]['_seconds']
|
||||
# if _seconds is greater than zero
|
||||
# then include the original back in seconds.
|
||||
# otherwise remove seconds from the listing as the
|
||||
# original item didn't include it.
|
||||
if schedule[job]['_seconds'] > 0:
|
||||
schedule[job]['seconds'] = schedule[job]['_seconds']
|
||||
else:
|
||||
del schedule[job]['seconds']
|
||||
|
||||
# remove _seconds from the listing
|
||||
del schedule[job]['_seconds']
|
||||
|
||||
if schedule:
|
||||
|
|
Loading…
Add table
Reference in a new issue