mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 21:44:52 -04:00
Use syntax that works on both py2.7 and py3
This commit is contained in:
parent
80916e6884
commit
239badea9b
8 changed files with 10 additions and 10 deletions
|
@ -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:]:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue