From 79f702e621e9fb59fdbafcbd775504acd922fed6 Mon Sep 17 00:00:00 2001 From: Christophe Bedard Date: Sun, 29 Dec 2019 12:58:56 -0500 Subject: [PATCH] Fix assert condition --- tracetools_analysis/tracetools_analysis/processor/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tracetools_analysis/tracetools_analysis/processor/__init__.py b/tracetools_analysis/tracetools_analysis/processor/__init__.py index 5cff556..61daaae 100644 --- a/tracetools_analysis/tracetools_analysis/processor/__init__.py +++ b/tracetools_analysis/tracetools_analysis/processor/__init__.py @@ -121,7 +121,7 @@ class EventHandler(Dependant): :param handler_map: the mapping from event name to handling method """ - assert handler_map is None or len(handler_map) > 0, \ + assert handler_map is not None and len(handler_map) > 0, \ f'empty map: {self.__class__.__name__}' assert all(required_name in handler_map.keys() for required_name in self.required_events()) self._handler_map = handler_map