examples, tests: Replace all @asyncio.coroutines with proper async functions.

This commit is contained in:
Emmanuel Gil Peyrot
2018-08-19 17:47:26 +01:00
parent 35fa33e3c2
commit 9f6fa65139
13 changed files with 58 additions and 71 deletions

View File

@@ -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)