summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-08-12 10:30:30 +0100
committerErik Johnston <erik@matrix.org>2015-08-12 10:30:30 +0100
commitd7451e0f22020624463d3c5f24a2fe54ed451b59 (patch)
treec2dccc35e4cddb5d415832dbfce39f6116ea48bf /synapse
parentWire up the dictionarycache to the metrics (diff)
parentMerge pull request #182 from matrix-org/manu/fix_no_rate_limit_in_federation_... (diff)
downloadsynapse-d7451e0f22020624463d3c5f24a2fe54ed451b59.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/dictionary_cache
Diffstat (limited to '')
-rw-r--r--synapse/util/caches/descriptors.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/util/caches/descriptors.py b/synapse/util/caches/descriptors.py
index c99fda849e..408c3b5e65 100644
--- a/synapse/util/caches/descriptors.py
+++ b/synapse/util/caches/descriptors.py
@@ -90,7 +90,9 @@ class Cache(object):
     def invalidate(self, key):
         self.check_thread()
         if not isinstance(key, tuple):
-            raise ValueError("keyargs must be a tuple.")
+            raise TypeError(
+                "The cache key must be a tuple not %r" % (type(key),)
+            )
 
         # Increment the sequence number so that any SELECT statements that
         # raced with the INSERT don't update the cache (SYN-369)