diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py index b7382c8..60adfb2 100644 --- a/sleekxmpp/xmlstream/xmlstream.py +++ b/sleekxmpp/xmlstream/xmlstream.py @@ -492,8 +492,8 @@ class XMLStream(object): # remove it now instead of waiting for it to be # processed in the queue. with self.__event_handlers_lock: - handler_index = self.__event_handlers[name].index(handler) try: + handler_index = self.__event_handlers[name].index(handler) self.__event_handlers[name].pop(handler_index) except: pass