summary refs log tree commit diff
path: root/synapse/storage/signatures.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-03-25 17:15:20 +0000
committerErik Johnston <erik@matrix.org>2015-03-25 17:15:20 +0000
commit0e8f5095c7e7075b249ad53a9f60a4d2fdeeaaed (patch)
tree39bdcca49ae0eabf09b3a98e2c4b810e0c68692f /synapse/storage/signatures.py
parentEscape non printing ascii character (diff)
downloadsynapse-0e8f5095c7e7075b249ad53a9f60a4d2fdeeaaed.tar.xz
Fix unicode database support
Diffstat (limited to 'synapse/storage/signatures.py')
-rw-r--r--synapse/storage/signatures.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/synapse/storage/signatures.py b/synapse/storage/signatures.py
index 13ce335101..35bba854f9 100644
--- a/synapse/storage/signatures.py
+++ b/synapse/storage/signatures.py
@@ -54,7 +54,7 @@ class SignatureStore(SQLBaseStore):
             {
                 "event_id": event_id,
                 "algorithm": algorithm,
-                "hash": buffer(hash_bytes),
+                "hash": hash_bytes,
             },
         )
 
@@ -99,7 +99,7 @@ class SignatureStore(SQLBaseStore):
             " WHERE event_id = ?"
         )
         txn.execute(query, (event_id, ))
-        return dict(txn.fetchall())
+        return {k: v for k, v in txn.fetchall()}
 
     def _store_event_reference_hash_txn(self, txn, event_id, algorithm,
                                         hash_bytes):
@@ -116,7 +116,7 @@ class SignatureStore(SQLBaseStore):
             {
                 "event_id": event_id,
                 "algorithm": algorithm,
-                "hash": buffer(hash_bytes),
+                "hash": hash_bytes,
             },
         )
 
@@ -160,7 +160,7 @@ class SignatureStore(SQLBaseStore):
                 "event_id": event_id,
                 "signature_name": signature_name,
                 "key_id": key_id,
-                "signature": buffer(signature_bytes),
+                "signature": signature_bytes,
             },
         )
 
@@ -193,6 +193,6 @@ class SignatureStore(SQLBaseStore):
                 "event_id": event_id,
                 "prev_event_id": prev_event_id,
                 "algorithm": algorithm,
-                "hash": buffer(hash_bytes),
+                "hash": hash_bytes,
             },
         )