summary refs log tree commit diff
path: root/synapse/handlers/pagination.py
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-02-19 15:11:59 +0000
committerAndrew Morgan <andrew@amorgan.xyz>2020-02-19 15:11:59 +0000
commitf590f77a163e182626b79cb4f6d551409b1f9b9b (patch)
tree65fc34b3e50745d8bb964dc4512f3ddb17c0c061 /synapse/handlers/pagination.py
parentOpentracing Utils (#5722) (diff)
parentReplace returnValue with return (#5736) (diff)
downloadsynapse-f590f77a163e182626b79cb4f6d551409b1f9b9b.tar.xz
Replace returnValue with return (#5736)
Diffstat (limited to 'synapse/handlers/pagination.py')
-rw-r--r--synapse/handlers/pagination.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/synapse/handlers/pagination.py b/synapse/handlers/pagination.py
index 1d1fe8996d..6711ced51a 100644
--- a/synapse/handlers/pagination.py
+++ b/synapse/handlers/pagination.py
@@ -350,13 +350,11 @@ class PaginationHandler(object):
             )
 
         if not events:
-            defer.returnValue(
-                {
-                    "chunk": [],
-                    "start": pagin_config.from_token.to_string(),
-                    "end": next_token.to_string(),
-                }
-            )
+            return {
+                "chunk": [],
+                "start": pagin_config.from_token.to_string(),
+                "end": next_token.to_string(),
+            }
 
         state = None
         if event_filter and event_filter.lazy_load_members() and len(events) > 0:
@@ -394,4 +392,4 @@ class PaginationHandler(object):
                 )
             )
 
-        defer.returnValue(chunk)
+        return chunk