kwargs may not contain require_in and watch_in

This commit is contained in:
Denis Generalov 2012-11-13 12:50:08 +04:00
parent a1f9a07194
commit ad3aa95e52

View File

@ -1676,7 +1676,8 @@ def accumulated(name, filename, text, **kwargs):
'result': True,
'comment': ''
}
if not filter(lambda x: 'file' in x, kwargs['require_in'] + kwargs['watch_in']):
if not filter(lambda x: 'file' in x,
kwargs.get('require_in', ()) + kwargs.get('watch_in', ())):
ret['result'] = False
ret['comment'] = ('Orphaned accumulator {0} in '
'{1}:{2}'.format(name, kwargs['__sls__'],