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_0153/vcard_avatar.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/plugins/xep_0153/vcard_avatar.py')
-rw-r--r-- | slixmpp/plugins/xep_0153/vcard_avatar.py | 5 |
1 files changed, 2 insertions, 3 deletions
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 = '' |