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/plugins/xep_0198 | |
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/plugins/xep_0198')
-rw-r--r-- | slixmpp/plugins/xep_0198/stream_management.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/slixmpp/plugins/xep_0198/stream_management.py b/slixmpp/plugins/xep_0198/stream_management.py index fbc9e023..759e82e1 100644 --- a/slixmpp/plugins/xep_0198/stream_management.py +++ b/slixmpp/plugins/xep_0198/stream_management.py @@ -174,8 +174,7 @@ class XEP_0198(BasePlugin): req = stanza.RequestAck(self.xmpp) self.xmpp.send_raw(str(req)) - @asyncio.coroutine - def _handle_sm_feature(self, features): + async def _handle_sm_feature(self, features): """ Enable or resume stream management. @@ -203,7 +202,7 @@ class XEP_0198(BasePlugin): MatchXPath(stanza.Enabled.tag_name()), MatchXPath(stanza.Failed.tag_name())])) self.xmpp.register_handler(waiter) - result = yield from waiter.wait() + result = await waiter.wait() elif self.sm_id and self.allow_resume and 'bind' not in self.xmpp.features: self.enabled = True resume = stanza.Resume(self.xmpp) @@ -219,7 +218,7 @@ class XEP_0198(BasePlugin): MatchXPath(stanza.Resumed.tag_name()), MatchXPath(stanza.Failed.tag_name())])) self.xmpp.register_handler(waiter) - result = yield from waiter.wait() + result = await waiter.wait() if result is not None and result.name == 'resumed': return True return False |