From 6a6e2c6eed814f33bfa0767041829ac4c797a4ef Mon Sep 17 00:00:00 2001 From: Christophe Bedard Date: Mon, 29 Jul 2019 15:49:39 +0200 Subject: [PATCH] Add assert for handler_map --- tracetools_analysis/tracetools_analysis/processor/handler.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tracetools_analysis/tracetools_analysis/processor/handler.py b/tracetools_analysis/tracetools_analysis/processor/handler.py index 5480609..b0944d9 100644 --- a/tracetools_analysis/tracetools_analysis/processor/handler.py +++ b/tracetools_analysis/tracetools_analysis/processor/handler.py @@ -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: