summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorAdrian Tschira <nota@notafile.com>2018-05-05 22:47:18 +0200
committerAdrian Tschira <nota@notafile.com>2018-05-24 20:20:33 +0200
commit17a70cf6e9ae016011972b4d8a97aca0c3d945d4 (patch)
treeb52681195451515f4fd2a5f4fe441030425b4934 /synapse/storage
parentMerge pull request #3278 from NotAFile/py3-storage-base (diff)
downloadsynapse-17a70cf6e9ae016011972b4d8a97aca0c3d945d4.tar.xz
Misc. py3 fixes
Signed-off-by: Adrian Tschira <nota@notafile.com>
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/events_worker.py2
-rw-r--r--synapse/storage/filtering.py2
-rw-r--r--synapse/storage/keys.py2
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