Add assert for handler_map

This commit is contained in:
Christophe Bedard 2019-07-29 15:49:39 +02:00
parent c958ddc8b6
commit 6a6e2c6eed

View file

@ -67,6 +67,7 @@ class EventHandler():
:param handler_map: the mapping from event name to handling method
"""
assert handler_map is not None and len(handler_map) > 0, f'empty map: {handler_map}'
self._handler_map = handler_map
def handle_events(self, events: List[Dict[str, str]]) -> None: