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/plugins/xep_0153/vcard_avatar.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'slixmpp/plugins/xep_0153') diff --git a/slixmpp/plugins/xep_0153/vcard_avatar.py b/slixmpp/plugins/xep_0153/vcard_avatar.py index bbbbd2ad..6430e8d6 100644 --- a/slixmpp/plugins/xep_0153/vcard_avatar.py +++ b/slixmpp/plugins/xep_0153/vcard_avatar.py @@ -98,10 +98,9 @@ class XEP_0153(BasePlugin): first_future.add_done_callback(propagate_timeout_exception) return future - @asyncio.coroutine - def _start(self, event): + async def _start(self, event): try: - vcard = yield from self.xmpp['xep_0054'].get_vcard(self.xmpp.boundjid.bare) + vcard = await self.xmpp['xep_0054'].get_vcard(self.xmpp.boundjid.bare) data = vcard['vcard_temp']['PHOTO']['BINVAL'] if not data: new_hash = '' -- cgit v1.2.3