summary refs log tree commit diff
path: root/synapse/util
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-06-09 13:35:15 +0100
committerErik Johnston <erik@matrix.org>2017-06-09 13:35:15 +0100
commitefc2b7db95c78f658d3719862702b85d5d9d4a76 (patch)
tree5d8bc7d5cf13ba1d645f845e6f0e8191906301de /synapse/util
parentFix has_any_entity_changed (diff)
downloadsynapse-efc2b7db95c78f658d3719862702b85d5d9d4a76.tar.xz
Rewrite conditional
Diffstat (limited to 'synapse/util')
-rw-r--r--synapse/util/caches/stream_change_cache.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/util/caches/stream_change_cache.py b/synapse/util/caches/stream_change_cache.py
index b723e33641..609625b322 100644
--- a/synapse/util/caches/stream_change_cache.py
+++ b/synapse/util/caches/stream_change_cache.py
@@ -99,7 +99,7 @@ class StreamChangeCache(object):
             keys = self._cache.keys()
             i = keys.bisect_right(stream_pos)
 
-            return len(keys[i:]) > 0
+            return i < len(keys)
         else:
             self.metrics.inc_misses()
             return True