Simplification when removing a deletable handler.
This commit is contained in:
parent
34f6195ca5
commit
8b5511c7ec
@ -845,7 +845,7 @@ class XMLStream(object):
|
|||||||
self.event_queue.put(('stanza', handler, stanza_copy))
|
self.event_queue.put(('stanza', handler, stanza_copy))
|
||||||
try:
|
try:
|
||||||
if handler.check_delete():
|
if handler.check_delete():
|
||||||
self.__handlers.pop(self.__handlers.index(handler))
|
self.__handlers.remove(handler)
|
||||||
except:
|
except:
|
||||||
pass # not thread safe
|
pass # not thread safe
|
||||||
unhandled = False
|
unhandled = False
|
||||||
|
Loading…
Reference in New Issue
Block a user