From 9f6fa6513946e78de6e77a7e924fedc84c89ad25 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sun, 19 Aug 2018 17:47:26 +0100 Subject: examples, tests: Replace all @asyncio.coroutines with proper async functions. --- examples/http_upload.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'examples/http_upload.py') diff --git a/examples/http_upload.py b/examples/http_upload.py index e34b7b01..4737731d 100755 --- a/examples/http_upload.py +++ b/examples/http_upload.py @@ -33,10 +33,9 @@ class HttpUpload(slixmpp.ClientXMPP): self.add_event_handler("session_start", self.start) - @asyncio.coroutine - def start(self, event): + async def start(self, event): log.info('Uploading file %s...', self.filename) - url = yield from self['xep_0363'].upload_file(self.filename) + url = await self['xep_0363'].upload_file(self.filename) log.info('Upload success!') log.info('Sending file to %s', self.recipient) -- cgit v1.2.3