summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sleekxmpp/xmlstream/xmlstream.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py
index 239eab8f..b7382c82 100644
--- a/sleekxmpp/xmlstream/xmlstream.py
+++ b/sleekxmpp/xmlstream/xmlstream.py
@@ -493,7 +493,10 @@ class XMLStream(object):
# processed in the queue.
with self.__event_handlers_lock:
handler_index = self.__event_handlers[name].index(handler)
- self.__event_handlers[name].pop(handler_index)
+ try:
+ self.__event_handlers[name].pop(handler_index)
+ except:
+ pass
def schedule(self, name, seconds, callback, args=None,
kwargs=None, repeat=False):