summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2011-11-19 18:49:18 -0800
committerLance Stout <lancestout@gmail.com>2011-11-19 18:49:18 -0800
commit3019c82d8a81dad911c39431358abf3e3aee3476 (patch)
treec2fe7d12213e2ff14d18210320b402384016c10e /sleekxmpp/xmlstream
parentf9d0b55ca3c3f43a3bc87047f55cbf4e16c3b67b (diff)
downloadslixmpp-3019c82d8a81dad911c39431358abf3e3aee3476.tar.gz
slixmpp-3019c82d8a81dad911c39431358abf3e3aee3476.tar.bz2
slixmpp-3019c82d8a81dad911c39431358abf3e3aee3476.tar.xz
slixmpp-3019c82d8a81dad911c39431358abf3e3aee3476.zip
Use a list comprehension instead of filter() to work with Python3.
Diffstat (limited to 'sleekxmpp/xmlstream')
-rw-r--r--sleekxmpp/xmlstream/xmlstream.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py
index cf7e0892..c3689ba0 100644
--- a/sleekxmpp/xmlstream/xmlstream.py
+++ b/sleekxmpp/xmlstream/xmlstream.py
@@ -1205,7 +1205,7 @@ class XMLStream(object):
# to run "in stream" will be executed immediately; the rest will
# be queued.
unhandled = True
- matched_handlers = filter(lambda h: h.match(stanza), self.__handlers)
+ matched_handlers = [h for h in self.__handlers if h.match(stanza)]
for handler in matched_handlers:
stanza_copy = copy.copy(stanza) if len(matched_handlers) > 1 else stanza
handler.prerun(stanza_copy)