From a50bffae890f52295e91603178597023140438ca Mon Sep 17 00:00:00 2001 From: mathieui Date: Sun, 6 Feb 2022 14:48:04 +0100 Subject: docs: remove yield from and fix some old changes --- docs/howto/guide_xep_0030.rst | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'docs/howto') diff --git a/docs/howto/guide_xep_0030.rst b/docs/howto/guide_xep_0030.rst index a3af4857..4b795c93 100644 --- a/docs/howto/guide_xep_0030.rst +++ b/docs/howto/guide_xep_0030.rst @@ -172,14 +172,14 @@ the `XEP-0059 `_ plug-in. .. code-block:: python - info = yield from self['xep_0030'].get_info(jid='foo@example.com', - node='bar', - ifrom='baz@mycomponent.example.com', - timeout=30) + info = await self['xep_0030'].get_info(jid='foo@example.com', + node='bar', + ifrom='baz@mycomponent.example.com', + timeout=30) - items = self['xep_0030'].get_info(jid='foo@example.com', - node='bar', - iterator=True) + items = await self['xep_0030'].get_items(jid='foo@example.com', + node='bar', + iterator=True) For more examples on how to use basic disco queries, check the ``disco_browser.py`` example in the ``examples`` directory. @@ -194,7 +194,7 @@ a full Iq stanza. .. code-block:: python - info = self['xep_0030'].get_info(node='foo', local=True) - items = self['xep_0030'].get_items(jid='somejid@mycomponent.example.com', - node='bar', - local=True) + info = await self['xep_0030'].get_info(node='foo', local=True) + items = await self['xep_0030'].get_items(jid='somejid@mycomponent.example.com', + node='bar', + local=True) -- cgit v1.2.3