summary refs log tree commit diff
path: root/synapse/state.py
diff options
context:
space:
mode:
authorAmber Brown <hawkowl@atleastfornow.net>2018-08-02 00:54:06 +1000
committerGitHub <noreply@github.com>2018-08-02 00:54:06 +1000
commitda7785147df442eb9cdc1031fa5fea12b7b25334 (patch)
tree4a10c31ba0cda805cd31047cdbb4aa9ccb32a8ce /synapse/state.py
parentMerge pull request #3543 from bebehei/docker (diff)
downloadsynapse-da7785147df442eb9cdc1031fa5fea12b7b25334.tar.xz
Python 3: Convert some unicode/bytes uses (#3569)
Diffstat (limited to 'synapse/state.py')
-rw-r--r--synapse/state.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/state.py b/synapse/state.py
index 033f55d967..e1092b97a9 100644
--- a/synapse/state.py
+++ b/synapse/state.py
@@ -577,7 +577,7 @@ def _make_state_cache_entry(
 
 def _ordered_events(events):
     def key_func(e):
-        return -int(e.depth), hashlib.sha1(e.event_id.encode()).hexdigest()
+        return -int(e.depth), hashlib.sha1(e.event_id.encode('ascii')).hexdigest()
 
     return sorted(events, key=key_func)