summaryrefslogtreecommitdiff
path: root/examples/register_account.py
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2018-08-19 17:47:26 +0100
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2018-08-19 17:47:26 +0100
commit9f6fa6513946e78de6e77a7e924fedc84c89ad25 (patch)
tree079a4f43a51cb7b4242c87aaa41810a30be11644 /examples/register_account.py
parent35fa33e3c232377acf77805d858a4efec54180ca (diff)
downloadslixmpp-9f6fa6513946e78de6e77a7e924fedc84c89ad25.tar.gz
slixmpp-9f6fa6513946e78de6e77a7e924fedc84c89ad25.tar.bz2
slixmpp-9f6fa6513946e78de6e77a7e924fedc84c89ad25.tar.xz
slixmpp-9f6fa6513946e78de6e77a7e924fedc84c89ad25.zip
examples, tests: Replace all @asyncio.coroutines with proper async functions.
Diffstat (limited to 'examples/register_account.py')
-rwxr-xr-xexamples/register_account.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/register_account.py b/examples/register_account.py
index 8ec238e9..76b5fcfc 100755
--- a/examples/register_account.py
+++ b/examples/register_account.py
@@ -66,7 +66,7 @@ class RegisterBot(slixmpp.ClientXMPP):
# We're only concerned about registering, so nothing more to do here.
self.disconnect()
- def register(self, iq):
+ async def register(self, iq):
"""
Fill out and submit a registration form.
@@ -90,7 +90,7 @@ class RegisterBot(slixmpp.ClientXMPP):
resp['register']['password'] = self.password
try:
- yield from resp.send()
+ await resp.send()
logging.info("Account created for %s!" % self.boundjid)
except IqError as e:
logging.error("Could not register account: %s" %