diff options
Diffstat (limited to 'examples/confirm_ask.py')
-rwxr-xr-x | examples/confirm_ask.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/examples/confirm_ask.py b/examples/confirm_ask.py index e3cd184a..27fdfde7 100755 --- a/examples/confirm_ask.py +++ b/examples/confirm_ask.py @@ -51,18 +51,17 @@ class AskConfirm(slixmpp.ClientXMPP): else: self.confirmed.set_result(True) - @asyncio.coroutine - def start(self, event): + async def start(self, event): log.info('Sending confirm request %s to %s who wants to access %s using ' 'method %s...' % (self.id, self.recipient, self.url, self.method)) try: - confirmed = yield from self['xep_0070'].ask_confirm(self.recipient, + confirmed = await self['xep_0070'].ask_confirm(self.recipient, id=self.id, url=self.url, method=self.method, message='Plz say yes or no for {method} {url} ({id}).') if isinstance(confirmed, slixmpp.Message): - confirmed = yield from self.confirmed + confirmed = await self.confirmed else: confirmed = True except IqError: |