diff --git a/ipaacalib/python/src/ipaaca/buffer.py b/ipaacalib/python/src/ipaaca/buffer.py index 7283039300dcf9dfa482e9c3fb557a930997ae45..cf9d3a841d37a8b46a07d4a90b2adfd70604e33a 100644 --- a/ipaacalib/python/src/ipaaca/buffer.py +++ b/ipaacalib/python/src/ipaaca/buffer.py @@ -155,6 +155,8 @@ class Buffer(object): for_categories -- a list of category names or None if handler should be called for all categories """ + if handler_function in [h._handler_function for h in self._iu_event_handlers]: + LOGGER.warn("The handler function '" + handler_function.__name__ + '" has been registered before.') handler = IUEventHandler(handler_function=handler_function, for_event_types=for_event_types, for_categories=for_categories) self._iu_event_handlers.append(handler) return handler