mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Revert "Some missing isinstance
checks". Pushed directly.
This reverts commit 2a7dd73710
.
This commit is contained in:
parent
2a7dd73710
commit
78c0b77afd
@ -1010,9 +1010,6 @@ class Schedule(object):
|
||||
except ValueError:
|
||||
log.error('Invalid date string. Ignoring')
|
||||
continue
|
||||
else:
|
||||
if isinstance(i, datetime.datetime):
|
||||
when__ = i
|
||||
else:
|
||||
try:
|
||||
when__ = dateutil_parser.parse(i)
|
||||
@ -1193,15 +1190,11 @@ class Schedule(object):
|
||||
continue
|
||||
else:
|
||||
if isinstance(data['range'], dict):
|
||||
start = data['range']['start']
|
||||
end = data['range']['start']
|
||||
if not isinstance(range_start, datetime.datetime):
|
||||
try:
|
||||
start = dateutil_parser.parse(start)
|
||||
start = dateutil_parser.parse(data['range']['start'])
|
||||
except ValueError:
|
||||
log.error('Invalid date string for start. Ignoring job %s.', job)
|
||||
continue
|
||||
if not isinstance(end, datetime.datetime):
|
||||
try:
|
||||
end = dateutil_parser.parse(data['range']['end'])
|
||||
except ValueError:
|
||||
@ -1342,9 +1335,7 @@ class Schedule(object):
|
||||
log.error('Missing python-dateutil. '
|
||||
'Ignoring until.')
|
||||
else:
|
||||
until = data['until']
|
||||
if not isinstance(until, datetime.datetime):
|
||||
until = dateutil_parser.parse(until)
|
||||
until = dateutil_parser.parse(data['until'])
|
||||
|
||||
if until <= now:
|
||||
log.debug(
|
||||
@ -1361,8 +1352,6 @@ class Schedule(object):
|
||||
log.error('Missing python-dateutil. '
|
||||
'Ignoring after.')
|
||||
else:
|
||||
after = data['after']
|
||||
if not isinstance(after, datetime.datetime):
|
||||
after = dateutil_parser.parse(data['after'])
|
||||
|
||||
if after >= now:
|
||||
|
Loading…
Reference in New Issue
Block a user