Mercurial > libervia-backend
diff sat/memory/memory.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 | 98d1f34ce5b9 |
children | 8b36e5c3f28f |
line wrap: on
line diff
--- a/sat/memory/memory.py Wed Sep 25 08:53:38 2019 +0200 +++ b/sat/memory/memory.py Wed Sep 25 08:56:41 2019 +0200 @@ -560,9 +560,11 @@ def initPersonalKey(__): # be sure to call this after checking that the profile doesn't exist yet + + # generated once for all and saved in a PersistentDict personal_key = BlockCipher.getRandomKey( base64=True - ) # generated once for all and saved in a PersistentDict + ).decode('utf-8') self.auth_sessions.newSession( {C.MEMORY_CRYPTO_KEY: personal_key}, profile=name ) # will be encrypted by setParam @@ -1260,8 +1262,8 @@ parent = current["parent"] if not parent: break - files_data = yield self.getFile( - self, client, peer_jid=None, file_id=parent, perms_to_check=None + files_data = yield self.getFiles( + client, peer_jid=None, file_id=parent, perms_to_check=None ) try: current = files_data[0]