From d4243edf6393a9eb7ea0fa08a7804c80bc73b6b9 Mon Sep 17 00:00:00 2001 From: jesopo Date: Fri, 31 Aug 2018 13:14:31 +0100 Subject: [PATCH] Remove _unhook and always use get_hooks() in IRCLineHandler --- EventManager.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/EventManager.py b/EventManager.py index 4190af05..40dae924 100644 --- a/EventManager.py +++ b/EventManager.py @@ -123,9 +123,6 @@ class EventHook(object): self._call(kwargs) self._stored_events = None - def _unhook(self, hook): - self._hooks.remove(hook) - def on(self, subevent, *extra_subevents, delimiter=DEFAULT_DELIMITER): return self._on(subevent, extra_subevents, None, delimiter) def _context_on(self, context, subevent, extra_subevents, @@ -210,7 +207,7 @@ class EventHook(object): return self._children.keys() def check_purge(self): - if len(self._hooks) == 0 and len(self._children + if len(self.get_hooks()) == 0 and len(self._children ) == 0 and not self.parent == None: self.parent.remove_child(self.name) self.parent.check_purge()