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:
Gareth J. Greenaway 2016-04-20 09:05:50 -07:00
parent f63566e452
commit 7fa5d809d2

View file

@ -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: