diff options
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2018-07-01 18:46:33 +0200 |
---|---|---|
committer | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2018-07-01 18:46:33 +0200 |
commit | 3502480384bd7d9f4e4eb1a3b92e8df08f4e487c (patch) | |
tree | a2e68835f4de6c32808412455f88310c05528191 /slixmpp/xmlstream/handler/waiter.py | |
parent | 66909aafb300868ffd3ed9ab02bc3bd28c49a6e9 (diff) | |
download | slixmpp-3502480384bd7d9f4e4eb1a3b92e8df08f4e487c.tar.gz slixmpp-3502480384bd7d9f4e4eb1a3b92e8df08f4e487c.tar.bz2 slixmpp-3502480384bd7d9f4e4eb1a3b92e8df08f4e487c.tar.xz slixmpp-3502480384bd7d9f4e4eb1a3b92e8df08f4e487c.zip |
Switch from @asyncio.coroutine to async def everywhere.
Diffstat (limited to 'slixmpp/xmlstream/handler/waiter.py')
-rw-r--r-- | slixmpp/xmlstream/handler/waiter.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/slixmpp/xmlstream/handler/waiter.py b/slixmpp/xmlstream/handler/waiter.py index 8a4d74ea..b82fa5ca 100644 --- a/slixmpp/xmlstream/handler/waiter.py +++ b/slixmpp/xmlstream/handler/waiter.py @@ -50,8 +50,7 @@ class Waiter(BaseHandler): """Do not process this handler during the main event loop.""" pass - @asyncio.coroutine - def wait(self, timeout=None): + async def wait(self, timeout=None): """Block an event handler while waiting for a stanza to arrive. Be aware that this will impact performance if called from a @@ -70,7 +69,7 @@ class Waiter(BaseHandler): stanza = None try: - stanza = yield from self._payload.get() + stanza = await self._payload.get() except TimeoutError: log.warning("Timed out waiting for %s", self.name) self.stream().remove_handler(self.name) |