diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2020-07-16 11:32:19 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-16 11:32:19 -0400 |
commit | f460da6031d01b2b271ded097ed6be65fd1b24f9 (patch) | |
tree | 46e683fe3355ae429e9c4cae4b24d85086479270 /synapse/storage/_base.py | |
parent | Combine nginx federation server blocks (#7823) (diff) | |
download | synapse-f460da6031d01b2b271ded097ed6be65fd1b24f9.tar.xz |
Consistently use `db_to_json` to convert from database values to JSON objects. (#7849)
Diffstat (limited to 'synapse/storage/_base.py')
-rw-r--r-- | synapse/storage/_base.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py index bfce541ca7..985a042869 100644 --- a/synapse/storage/_base.py +++ b/synapse/storage/_base.py @@ -100,8 +100,8 @@ def db_to_json(db_content): if isinstance(db_content, memoryview): db_content = db_content.tobytes() - # Decode it to a Unicode string before feeding it to json.loads, so we - # consistenty get a Unicode-containing object out. + # Decode it to a Unicode string before feeding it to json.loads, since + # Python 3.5 does not support deserializing bytes. if isinstance(db_content, (bytes, bytearray)): db_content = db_content.decode("utf8") |