summary refs log tree commit diff
path: root/synapse/api
diff options
context:
space:
mode:
authorMatthew Hodgson <matthew@matrix.org>2018-05-03 00:26:33 +0100
committerMatthew Hodgson <matthew@matrix.org>2018-05-03 00:26:33 +0100
commit50d5a97c1b3eb07deaa59f1d75f105415df0ba0d (patch)
treec8f980ae0a8c2e4d34d52e2ee7fb09383867a396 /synapse/api
parentMerge pull request #3166 from matrix-org/dbkr/postgres_doesnt_have_ifnull (diff)
parentmissing word :| (diff)
downloadsynapse-50d5a97c1b3eb07deaa59f1d75f105415df0ba0d.tar.xz
Merge branch 'master' into dinsic
Diffstat (limited to 'synapse/api')
-rw-r--r--synapse/api/constants.py3
-rw-r--r--synapse/api/errors.py3
2 files changed, 5 insertions, 1 deletions
diff --git a/synapse/api/constants.py b/synapse/api/constants.py

index 489efb7f86..5baba43966 100644 --- a/synapse/api/constants.py +++ b/synapse/api/constants.py
@@ -16,6 +16,9 @@ """Contains constants from the specification.""" +# the "depth" field on events is limited to 2**63 - 1 +MAX_DEPTH = 2**63 - 1 + class Membership(object): diff --git a/synapse/api/errors.py b/synapse/api/errors.py
index bee59e80dd..a9ff5576f3 100644 --- a/synapse/api/errors.py +++ b/synapse/api/errors.py
@@ -18,6 +18,7 @@ import logging import simplejson as json +from six import iteritems logger = logging.getLogger(__name__) @@ -297,7 +298,7 @@ def cs_error(msg, code=Codes.UNKNOWN, **kwargs): A dict representing the error response JSON. """ err = {"error": msg, "errcode": code} - for key, value in kwargs.iteritems(): + for key, value in iteritems(kwargs): err[key] = value return err