Skip to content
This repository has been archived by the owner on Jul 24, 2018. It is now read-only.

Commit

Permalink
Work with broken Koschei rules
Browse files Browse the repository at this point in the history
Messages sent in the morning of 2015-09-25 were missing the groups
field. Deal with that not existing.

Example messages:
- 2015-eebf137e-cc22-48c2-87f0-7d736950f76b
- 2015-2a5361ec-9c36-438a-8233-709e9f006003

Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
  • Loading branch information
puiterwijk committed Sep 25, 2015
1 parent 4049b85 commit 6977b25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fmn/rules/koschei.py
Expand Up @@ -22,4 +22,4 @@ def koschei_group(config, message, group=None):
if not group or 'koschei' not in message['topic']:
return False
groups = set([item.strip() for item in group.split(',')])
return bool(groups.intersection(message['msg'].get('groups')))
return bool(groups.intersection(message['msg'].get('groups', [])))

0 comments on commit 6977b25

Please sign in to comment.