mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-01 08:46:03 -04:00
Port handlers/ to Python 3 (#3803)
This commit is contained in:
parent
4f8baab0c4
commit
2608ebc04c
8 changed files with 24 additions and 19 deletions
|
@ -330,7 +330,8 @@ class E2eKeysHandler(object):
|
|||
(algorithm, key_id, ex_json, key)
|
||||
)
|
||||
else:
|
||||
new_keys.append((algorithm, key_id, encode_canonical_json(key)))
|
||||
new_keys.append((
|
||||
algorithm, key_id, encode_canonical_json(key).decode('ascii')))
|
||||
|
||||
yield self.store.add_e2e_one_time_keys(
|
||||
user_id, device_id, time_now, new_keys
|
||||
|
@ -358,7 +359,7 @@ def _exception_to_failure(e):
|
|||
# Note that some Exceptions (notably twisted's ResponseFailed etc) don't
|
||||
# give a string for e.message, which json then fails to serialize.
|
||||
return {
|
||||
"status": 503, "message": str(e.message),
|
||||
"status": 503, "message": str(e),
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue