summary refs log tree commit diff
path: root/synapse/util/caches/expiringcache.py
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2016-03-07 20:13:10 +0000
committerMark Haines <mark.haines@matrix.org>2016-03-07 20:13:10 +0000
commit239badea9be1dd7857833408209ef22dd99773de (patch)
tree80374571f6fab646c8e38ba8bffc3fb1477440d0 /synapse/util/caches/expiringcache.py
parentMerge pull request #626 from matrix-org/erikj/visibility (diff)
downloadsynapse-239badea9be1dd7857833408209ef22dd99773de.tar.xz
Use syntax that works on both py2.7 and py3
Diffstat (limited to '')
-rw-r--r--synapse/util/caches/expiringcache.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/util/caches/expiringcache.py b/synapse/util/caches/expiringcache.py
index e863a8f8a9..2b68c1ac93 100644
--- a/synapse/util/caches/expiringcache.py
+++ b/synapse/util/caches/expiringcache.py
@@ -69,7 +69,7 @@ class ExpiringCache(object):
         if self._max_len and len(self._cache.keys()) > self._max_len:
             sorted_entries = sorted(
                 self._cache.items(),
-                key=lambda (k, v): v.time,
+                key=lambda item: item[1].time,
             )
 
             for k, _ in sorted_entries[self._max_len:]: