From e1f20462293b9337e3d65fe8554645853e4d3dcb Mon Sep 17 00:00:00 2001 From: clowwindy Date: Thu, 11 Dec 2014 14:09:18 +0800 Subject: [PATCH] lint code --- shadowsocks/lru_cache.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shadowsocks/lru_cache.py b/shadowsocks/lru_cache.py index 6400a2c..4523399 100644 --- a/shadowsocks/lru_cache.py +++ b/shadowsocks/lru_cache.py @@ -86,13 +86,13 @@ class LRUCache(collections.MutableMapping): break if self.close_callback is not None: for key in self._time_to_keys[least]: - if self._store.__contains__(key): + if key in self._store: if now - self._keys_to_last_time[key] > self.timeout: value = self._store[key] self.close_callback(value) for key in self._time_to_keys[least]: self._last_visits.popleft() - if self._store.__contains__(key): + if key in self._store: if now - self._keys_to_last_time[key] > self.timeout: del self._store[key] del self._keys_to_last_time[key]