Print invalid rules to help debug broken configurations

This commit is contained in:
Fabio Manganiello 2022-06-08 15:32:04 +02:00
parent 35cb72f5aa
commit 1da17fca35

View file

@ -63,7 +63,7 @@ class EventCondition(object):
else:
rule = parse(rule)
assert isinstance(rule, dict)
assert isinstance(rule, dict), f'Not a valid rule: {rule}'
type = get_event_class_by_type(
rule.pop('type') if 'type' in rule else 'Event')