projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f4a6b51
)
[FIX] RuntimeError in the cache system
author
Christophe Simonis
<christophe@cobalt>
Tue, 23 Dec 2008 15:13:50 +0000
(16:13 +0100)
committer
Christophe Simonis
<christophe@cobalt>
Tue, 23 Dec 2008 15:13:50 +0000
(16:13 +0100)
lp bug: https://launchpad.net/bugs/310918 fixed
bzr revid: christophe@cobalt-
20081223151350
-aw44igucwyldnhwr
bin/tools/misc.py
patch
|
blob
|
history
diff --git
a/bin/tools/misc.py
b/bin/tools/misc.py
index
93b2d83
..
993f4eb
100644
(file)
--- a/
bin/tools/misc.py
+++ b/
bin/tools/misc.py
@@
-552,9
+552,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:
- 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]
if cr is None:
self.cache = {}