summaryrefslogtreecommitdiff
path: root/poezio/asyncio.py
diff options
context:
space:
mode:
Diffstat (limited to 'poezio/asyncio.py')
-rw-r--r--poezio/asyncio.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/poezio/asyncio.py b/poezio/asyncio.py
index 2b02a91f..d333ffa6 100644
--- a/poezio/asyncio.py
+++ b/poezio/asyncio.py
@@ -28,6 +28,7 @@ def monkey_patch_asyncio_slixmpp():
if self._idle:
handle = self._idle.popleft()
handle._run()
+
cls = asyncio.get_event_loop().__class__
cls._idle = collections.deque()
cls.idle_call = idle_call
@@ -35,8 +36,8 @@ def monkey_patch_asyncio_slixmpp():
cls._run_once = my_run_once
spawn_event = slixmpp.xmlstream.XMLStream._spawn_event
+
def patchy(self, xml):
self.loop.idle_call(functools.partial(spawn_event, self, xml))
- slixmpp.xmlstream.XMLStream._spawn_event = patchy
-
+ slixmpp.xmlstream.XMLStream._spawn_event = patchy