summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-04-11 10:58:24 +0100
committerErik Johnston <erik@matrix.org>2016-04-11 10:58:24 +0100
commit6c11bb956cd50ce65be9ff9e32f9206b12b8413c (patch)
tree1942ffb2fed9a7fa3bc1572bcab48d794d5e7395
parentMerge branch 'develop' into HEAD (diff)
downloadsynapse-github/erikj/pypy.tar.xz
Fix pypy repr for DomainSpecificString github/erikj/pypy erikj/pypy
-rw-r--r--synapse/rest/client/v2_alpha/sync.py2
-rw-r--r--synapse/types.py7
2 files changed, 7 insertions, 2 deletions
diff --git a/synapse/rest/client/v2_alpha/sync.py b/synapse/rest/client/v2_alpha/sync.py
index 81fc378556..b45b4afa33 100644
--- a/synapse/rest/client/v2_alpha/sync.py
+++ b/synapse/rest/client/v2_alpha/sync.py
@@ -109,7 +109,7 @@ class SyncRestServlet(RestServlet):
         full_state = parse_boolean(request, "full_state", default=False)
 
         logger.info(
-            "/sync: user=%r, timeout=%r, since=%r,"
+            "/sync: user=%s, timeout=%r, since=%r,"
             " set_presence=%r, filter_id=%r" % (
                 user, timeout, since, set_presence, filter_id
             )
diff --git a/synapse/types.py b/synapse/types.py
index 5b166835bd..5c9692b55f 100644
--- a/synapse/types.py
+++ b/synapse/types.py
@@ -37,7 +37,7 @@ class DomainSpecificString(
     # set by:
     #    users = set(user)
     def __iter__(self):
-        raise ValueError("Attempted to iterate a %s" % (type(self).__name__,))
+        raise ValueError("Attempted to iterate a %s" % (type(self).__name__,),)
 
     # Because this class is a namedtuple of strings and booleans, it is deeply
     # immutable.
@@ -83,6 +83,11 @@ class DomainSpecificString(
 
     __str__ = to_string
 
+    def __repr__(self):
+        return "%r(%r, %r)" % (
+            type(self).__name__, self.localpart, self.domain,
+        )
+
     @classmethod
     def create(cls, localpart, domain,):
         return cls(localpart=localpart, domain=domain)