jp: jp asyncio port:
/!\ this commit is huge. Jp is temporarily not working with `dbus` bridge /!\ This patch implements the port of jp to asyncio, so it is now correctly using the bridge asynchronously, and it can be used with bridges like `pb`. This also simplify the code, notably for things which were previously implemented with many callbacks (like pagination with RSM). During the process, some behaviours have been modified/fixed, in jp and backends, check diff for details.
This commit is contained in:
parent
5cee4fbab7
commit
76aadbb3fb
1 changed files with 3299 additions and 3300 deletions
|
|
@ -42,8 +42,9 @@ class Parse(base.CommandBase):
|
|||
"uri", help=_("XMPP URI to parse")
|
||||
)
|
||||
|
||||
def start(self):
|
||||
self.output(uri.parseXMPPUri(self.args.uri))
|
||||
async def start(self):
|
||||
await self.output(uri.parseXMPPUri(self.args.uri))
|
||||
self.host.quit()
|
||||
|
||||
|
||||
class Build(base.CommandBase):
|
||||
|
|
@ -65,9 +66,10 @@ class Build(base.CommandBase):
|
|||
help=_("URI fields"),
|
||||
)
|
||||
|
||||
def start(self):
|
||||
async def start(self):
|
||||
fields = dict(self.args.fields) if self.args.fields else {}
|
||||
self.disp(uri.buildXMPPUri(self.args.type, path=self.args.path, **fields))
|
||||
self.host.quit()
|
||||
|
||||
|
||||
class Uri(base.CommandBase):
|
||||
|
|
|
|||
Loading…
Reference in a new issue