From 8b5511c7ec036aef6a243c3c5e801cdaa7a4863a Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Sun, 13 Feb 2011 16:40:04 -0500 Subject: [PATCH] Simplification when removing a deletable handler. --- sleekxmpp/xmlstream/xmlstream.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py index 1cd23fba..560b80a0 100644 --- a/sleekxmpp/xmlstream/xmlstream.py +++ b/sleekxmpp/xmlstream/xmlstream.py @@ -845,7 +845,7 @@ class XMLStream(object): self.event_queue.put(('stanza', handler, stanza_copy)) try: if handler.check_delete(): - self.__handlers.pop(self.__handlers.index(handler)) + self.__handlers.remove(handler) except: pass # not thread safe unhandled = False