summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJay (Open ERP) <jvo@tinyerp.com>2009-10-26 18:20:05 +0530
committerJay (Open ERP) <jvo@tinyerp.com>2009-10-26 18:20:05 +0530
commitbbad963f1b9c3cae478a75bb99abe13f9aeda9c6 (patch)
treeb60c4ef11551b5e8176e3f5ef122d3640e47371a /bin
parentda2e99051a57989c592418668ab4614baf142c4e (diff)
[FIX] Config : wrong calculation if cached_timeout comes from config file
bzr revid: jvo@tinyerp.com-20091026125005-r8jbk8iqhpessa2c
Diffstat (limited to 'bin')
-rw-r--r--bin/tools/misc.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/tools/misc.py b/bin/tools/misc.py
index d8bd58bfcbd..ca93a3936e2 100644
--- a/bin/tools/misc.py
+++ b/bin/tools/misc.py
@@ -662,9 +662,9 @@ class cache(object):
self.fun_default_values = dict(zip(self.fun_arg_names[-len(argspec[3]):], argspec[3]))
def cached_result(self2, cr, *args, **kwargs):
- if time.time()-self.timeout > self.lasttime:
+ if time.time()-int(self.timeout) > self.lasttime:
self.lasttime = time.time()
- t = time.time()-self.timeout
+ t = time.time()-int(self.timeout)
old_keys = [key for key in self.cache if self.cache[key][1] < t]
for key in old_keys:
del self.cache[key]