[FIX] RuntimeError in the cache system
lp bug: https://launchpad.net/bugs/310918 fixed bzr revid: olt@tinyerp.com-20090718112110-0p29jjruvhiwjrp0
This commit is contained in:
parent
9b8f222fd9
commit
22ac7ba66e
|
@ -659,9 +659,9 @@ class cache(object):
|
|||
if time.time()-self.timeout > self.lasttime:
|
||||
self.lasttime = time.time()
|
||||
t = time.time()-self.timeout
|
||||
for key in self.cache.keys():
|
||||
if self.cache[key][1]<t:
|
||||
del self.cache[key]
|
||||
old_keys = [key for key in self.cache if self.cache[key][1] < t]
|
||||
for key in old_keys:
|
||||
del self.cache[key]
|
||||
|
||||
kwargs2 = self._unify_args(*args, **kwargs)
|
||||
|
||||
|
|
Loading…
Reference in New Issue