From 3502480384bd7d9f4e4eb1a3b92e8df08f4e487c Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sun, 1 Jul 2018 18:46:33 +0200 Subject: Switch from @asyncio.coroutine to async def everywhere. --- slixmpp/features/feature_bind/bind.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'slixmpp/features/feature_bind/bind.py') diff --git a/slixmpp/features/feature_bind/bind.py b/slixmpp/features/feature_bind/bind.py index e837ee0a..bd2a3b99 100644 --- a/slixmpp/features/feature_bind/bind.py +++ b/slixmpp/features/feature_bind/bind.py @@ -35,8 +35,7 @@ class FeatureBind(BasePlugin): register_stanza_plugin(Iq, stanza.Bind) register_stanza_plugin(StreamFeatures, stanza.Bind) - @asyncio.coroutine - def _handle_bind_resource(self, features): + async def _handle_bind_resource(self, features): """ Handle requesting a specific resource. @@ -51,7 +50,7 @@ class FeatureBind(BasePlugin): if self.xmpp.requested_jid.resource: iq['bind']['resource'] = self.xmpp.requested_jid.resource - yield from iq.send(callback=self._on_bind_response) + await iq.send(callback=self._on_bind_response) def _on_bind_response(self, response): self.xmpp.boundjid = JID(response['bind']['jid']) -- cgit v1.2.3