git://git.onelab.eu
/
sfa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
2to3 -f has_key
[sfa.git]
/
sfa
/
util
/
cache.py
diff --git
a/sfa/util/cache.py
b/sfa/util/cache.py
index
ee4716c
..
38eccc9
100644
(file)
--- a/
sfa/util/cache.py
+++ b/
sfa/util/cache.py
@@
-75,7
+75,7
@@
class Cache:
def add(self, key, value, ttl = DEFAULT_CACHE_TTL):
with self.lock:
- if
self.cache.has_key(key)
:
+ if
key in self.cache
:
self.cache[key].set_data(value, ttl=ttl)
else:
self.cache[key] = CacheData(value, ttl)