[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:
Olivier Laurent 2009-07-18 13:21:10 +02:00
parent 9b8f222fd9
commit 22ac7ba66e
1 changed files with 3 additions and 3 deletions

View File

@ -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)