diff options
author | mathieui <mathieui@mathieui.net> | 2017-11-12 15:03:09 +0100 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2017-11-12 15:03:09 +0100 |
commit | d55cc5872503567775f0d7a7731d6f489bf2299b (patch) | |
tree | 725f9e7b8144d36054447b3c82edfb45bda8df1d /poezio/asyncio.py | |
parent | 92496db823db34f7f7fb1ab31eaef093a707c3e8 (diff) | |
download | poezio-d55cc5872503567775f0d7a7731d6f489bf2299b.tar.gz poezio-d55cc5872503567775f0d7a7731d6f489bf2299b.tar.bz2 poezio-d55cc5872503567775f0d7a7731d6f489bf2299b.tar.xz poezio-d55cc5872503567775f0d7a7731d6f489bf2299b.zip |
yapf -ir
Diffstat (limited to 'poezio/asyncio.py')
-rw-r--r-- | poezio/asyncio.py | 5 |
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 |