diff options
author | Amber Brown <hawkowl@atleastfornow.net> | 2018-05-24 14:22:59 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-24 14:22:59 -0500 |
commit | 5b788aba905d0efbac7e99acb2a9d98ce2f33863 (patch) | |
tree | b52681195451515f4fd2a5f4fe441030425b4934 /synapse/storage | |
parent | Merge pull request #3278 from NotAFile/py3-storage-base (diff) | |
parent | Misc. py3 fixes (diff) | |
download | synapse-5b788aba905d0efbac7e99acb2a9d98ce2f33863.tar.xz |
Merge pull request #3280 from NotAFile/py3-more-misc
More Misc. py3 fixes
Diffstat (limited to 'synapse/storage')
-rw-r--r-- | synapse/storage/events_worker.py | 2 | ||||
-rw-r--r-- | synapse/storage/filtering.py | 2 | ||||
-rw-r--r-- | synapse/storage/keys.py | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/synapse/storage/events_worker.py b/synapse/storage/events_worker.py index ba834854e1..32d9d00ffb 100644 --- a/synapse/storage/events_worker.py +++ b/synapse/storage/events_worker.py @@ -337,7 +337,7 @@ class EventsWorkerStore(SQLBaseStore): def _fetch_event_rows(self, txn, events): rows = [] N = 200 - for i in range(1 + len(events) / N): + for i in range(1 + len(events) // N): evs = events[i * N:(i + 1) * N] if not evs: break diff --git a/synapse/storage/filtering.py b/synapse/storage/filtering.py index 78b1e30945..2e2763126d 100644 --- a/synapse/storage/filtering.py +++ b/synapse/storage/filtering.py @@ -44,7 +44,7 @@ class FilteringStore(SQLBaseStore): desc="get_user_filter", ) - defer.returnValue(json.loads(str(def_json).decode("utf-8"))) + defer.returnValue(json.loads(bytes(def_json).decode("utf-8"))) def add_user_filter(self, user_localpart, user_filter): def_json = encode_canonical_json(user_filter) diff --git a/synapse/storage/keys.py b/synapse/storage/keys.py index 87aeaf71d6..0540c2b0b1 100644 --- a/synapse/storage/keys.py +++ b/synapse/storage/keys.py @@ -92,7 +92,7 @@ class KeyStore(SQLBaseStore): if verify_key_bytes: defer.returnValue(decode_verify_key_bytes( - key_id, str(verify_key_bytes) + key_id, bytes(verify_key_bytes) )) @defer.inlineCallbacks |