summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-09-25 17:22:33 +0100
committerErik Johnston <erik@matrix.org>2019-09-25 17:22:33 +0100
commit39b50ad42a8cf784e627959e9652589338121ccd (patch)
tree77e1ee6c4c94cc1d6fdf642a265da5448fa917cc /synapse/storage
parentNewsfile (diff)
downloadsynapse-39b50ad42a8cf784e627959e9652589338121ccd.tar.xz
Review comments
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/background_updates.py5
-rw-r--r--synapse/storage/client_ips.py2
2 files changed, 2 insertions, 5 deletions
diff --git a/synapse/storage/background_updates.py b/synapse/storage/background_updates.py
index 3fc25cd828..30788137a8 100644
--- a/synapse/storage/background_updates.py
+++ b/synapse/storage/background_updates.py
@@ -148,11 +148,8 @@ class BackgroundUpdateStore(SQLBaseStore):
 
         return False
 
-    async def has_completed_background_update(self, update_name):
+    async def has_completed_background_update(self, update_name) -> bool:
         """Check if the given background update has finished running.
-
-        Returns:
-            Deferred[bool]
         """
 
         if self._all_done:
diff --git a/synapse/storage/client_ips.py b/synapse/storage/client_ips.py
index 176c812b1f..a4d40dfa1e 100644
--- a/synapse/storage/client_ips.py
+++ b/synapse/storage/client_ips.py
@@ -506,7 +506,7 @@ class ClientIpStore(background_updates.BackgroundUpdateStore):
         """Removes entries in user IPs older than the configured period.
         """
 
-        if not self.user_ips_max_age:
+        if self.user_ips_max_age is None:
             # Nothing to do
             return