summary refs log tree commit diff
path: root/synapse/util/caches
diff options
context:
space:
mode:
authorDavid Robertson <davidr@element.io>2023-08-24 15:53:07 +0100
committerGitHub <noreply@github.com>2023-08-24 14:53:07 +0000
commite691243e191d9dad2bcbf55f9659d007f75fd28e (patch)
tree91db17d2145140077779b4532094b6a464479ba3 /synapse/util/caches
parentAdd `Retry-After` to M_LIMIT_EXCEEDED error responses (#16136) (diff)
downloadsynapse-e691243e191d9dad2bcbf55f9659d007f75fd28e.tar.xz
Fix typechecking with twisted trunk (#16121)
Diffstat (limited to 'synapse/util/caches')
-rw-r--r--synapse/util/caches/deferred_cache.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/util/caches/deferred_cache.py b/synapse/util/caches/deferred_cache.py
index bf7bd351e0..029eedcc6f 100644
--- a/synapse/util/caches/deferred_cache.py
+++ b/synapse/util/caches/deferred_cache.py
@@ -470,7 +470,7 @@ class CacheMultipleEntries(CacheEntry[KT, VT]):
     def deferred(self, key: KT) -> "defer.Deferred[VT]":
         if not self._deferred:
             self._deferred = ObservableDeferred(defer.Deferred(), consumeErrors=True)
-        return self._deferred.observe().addCallback(lambda res: res.get(key))
+        return self._deferred.observe().addCallback(lambda res: res[key])
 
     def add_invalidation_callback(
         self, key: KT, callback: Optional[Callable[[], None]]