Remove _unhook and always use get_hooks() in IRCLineHandler
This commit is contained in:
parent
d6ee10c513
commit
03fbd3c8e1
1 changed files with 1 additions and 4 deletions
|
@ -123,9 +123,6 @@ class EventHook(object):
|
||||||
self._call(kwargs)
|
self._call(kwargs)
|
||||||
self._stored_events = None
|
self._stored_events = None
|
||||||
|
|
||||||
def _unhook(self, hook):
|
|
||||||
self._hooks.remove(hook)
|
|
||||||
|
|
||||||
def on(self, subevent, *extra_subevents, delimiter=DEFAULT_DELIMITER):
|
def on(self, subevent, *extra_subevents, delimiter=DEFAULT_DELIMITER):
|
||||||
return self._on(subevent, extra_subevents, None, delimiter)
|
return self._on(subevent, extra_subevents, None, delimiter)
|
||||||
def _context_on(self, context, subevent, extra_subevents,
|
def _context_on(self, context, subevent, extra_subevents,
|
||||||
|
@ -210,7 +207,7 @@ class EventHook(object):
|
||||||
return self._children.keys()
|
return self._children.keys()
|
||||||
|
|
||||||
def check_purge(self):
|
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:
|
) == 0 and not self.parent == None:
|
||||||
self.parent.remove_child(self.name)
|
self.parent.remove_child(self.name)
|
||||||
self.parent.check_purge()
|
self.parent.check_purge()
|
||||||
|
|
Loading…
Reference in a new issue