fix evaluating jobs when "pillar" is missing in opts

This commit is contained in:
Vyacheslav Spiridonov 2017-03-16 10:26:56 +03:00
parent 9d5db1910c
commit 595f786327

View file

@ -437,7 +437,7 @@ class Schedule(object):
'''
schedule = {}
if include_pillar:
pillar_schedule = self.opts['pillar'].get('schedule', {})
pillar_schedule = self.opts.get('pillar', {}).get('schedule', {})
if not isinstance(pillar_schedule, dict):
raise ValueError('Schedule must be of type dict.')
schedule.update(pillar_schedule)