summary refs log tree commit diff
path: root/synapse/streams/config.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-10-02 10:33:49 +0100
committerErik Johnston <erik@matrix.org>2015-10-02 10:33:49 +0100
commitd5e081c7ae4c1669d7f1b1280a893bc80c0ae72a (patch)
tree4458974456c631386c7acd699b15a9f51779f0b2 /synapse/streams/config.py
parentMerge branch 'develop' of github.com:matrix-org/synapse into erikj/unfederatable (diff)
parentMerge pull request #283 from matrix-org/erikj/atomic_join_federation (diff)
downloadsynapse-d5e081c7ae4c1669d7f1b1280a893bc80c0ae72a.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/unfederatable
Diffstat (limited to 'synapse/streams/config.py')
-rw-r--r--synapse/streams/config.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/synapse/streams/config.py b/synapse/streams/config.py
index 2ec7c5403b..167bfe0de3 100644
--- a/synapse/streams/config.py
+++ b/synapse/streams/config.py
@@ -34,6 +34,11 @@ class SourcePaginationConfig(object):
         self.direction = 'f' if direction == 'f' else 'b'
         self.limit = int(limit) if limit is not None else None
 
+    def __repr__(self):
+        return (
+            "StreamConfig(from_key=%r, to_key=%r, direction=%r, limit=%r)"
+        ) % (self.from_key, self.to_key, self.direction, self.limit)
+
 
 class PaginationConfig(object):
 
@@ -94,10 +99,10 @@ class PaginationConfig(object):
             logger.exception("Failed to create pagination config")
             raise SynapseError(400, "Invalid request.")
 
-    def __str__(self):
+    def __repr__(self):
         return (
-            "<PaginationConfig from_tok=%s, to_tok=%s, "
-            "direction=%s, limit=%s>"
+            "PaginationConfig(from_tok=%r, to_tok=%r,"
+            " direction=%r, limit=%r)"
         ) % (self.from_token, self.to_token, self.direction, self.limit)
 
     def get_source_config(self, source_name):