diff options
| author | Olivier Laurent <olt@tinyerp.com> | 2009-07-18 13:21:10 +0200 |
|---|---|---|
| committer | Olivier Laurent <olt@tinyerp.com> | 2009-07-18 13:21:10 +0200 |
| commit | 22ac7ba66eae2d53ded9a1dc46d9e1078db313d2 (patch) | |
| tree | b0fa4c0837a2a078846c7670e4c8722ea2148e5d /bin/tools/misc.py | |
| parent | 9b8f222fd9abebc127e30660003c15cf072d2b81 (diff) | |
[FIX] RuntimeError in the cache system
lp bug: https://launchpad.net/bugs/310918 fixed
bzr revid: olt@tinyerp.com-20090718112110-0p29jjruvhiwjrp0
Diffstat (limited to 'bin/tools/misc.py')
| -rw-r--r-- | bin/tools/misc.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/tools/misc.py b/bin/tools/misc.py index a2712ee006e..9d4ea4d66cd 100644 --- a/bin/tools/misc.py +++ b/bin/tools/misc.py @@ -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) |
