Mercurial > libervia-backend
diff sat/core/xmpp.py @ 3040:fee60f17ebac
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.
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 25 Sep 2019 08:56:41 +0200 |
parents | ab2696e34d29 |
children | 691283719bb2 |
line wrap: on
line diff
--- a/sat/core/xmpp.py Wed Sep 25 08:53:38 2019 +0200 +++ b/sat/core/xmpp.py Wed Sep 25 08:56:41 2019 +0200 @@ -86,11 +86,11 @@ self.actions = {} # used to keep track of actions for retrieval (key = action_id) self.encryption = encryption.EncryptionHandler(self) - def __unicode__(self): - return "Client instance for profile {profile}".format(profile=self.profile) + def __str__(self): + return f"Client for profile {self.profile}" - def __str__(self): - return self.__unicode__.encode('utf-8') + def __repr__(self): + return f"{super().__repr__()} - profile: {self.profile!r}" ## initialisation ##