From 3019c82d8a81dad911c39431358abf3e3aee3476 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Sat, 19 Nov 2011 18:49:18 -0800 Subject: Use a list comprehension instead of filter() to work with Python3. --- sleekxmpp/xmlstream/xmlstream.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sleekxmpp/xmlstream/xmlstream.py') 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) -- cgit v1.2.3