summary refs log tree commit diff
path: root/synapse/api/errors.py
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/api/errors.py')
-rw-r--r--synapse/api/errors.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/api/errors.py b/synapse/api/errors.py
index aa15f73f36..a9ff5576f3 100644
--- a/synapse/api/errors.py
+++ b/synapse/api/errors.py
@@ -15,9 +15,11 @@
 
 """Contains exceptions and error codes."""
 
-import json
 import logging
 
+import simplejson as json
+from six import iteritems
+
 logger = logging.getLogger(__name__)
 
 
@@ -296,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