diff options
| author | Jay (Open ERP) <jvo@tinyerp.com> | 2009-10-26 18:20:05 +0530 |
|---|---|---|
| committer | Jay (Open ERP) <jvo@tinyerp.com> | 2009-10-26 18:20:05 +0530 |
| commit | bbad963f1b9c3cae478a75bb99abe13f9aeda9c6 (patch) | |
| tree | b60c4ef11551b5e8176e3f5ef122d3640e47371a /bin/tools/misc.py | |
| parent | da2e99051a57989c592418668ab4614baf142c4e (diff) | |
[FIX] Config : wrong calculation if cached_timeout comes from config file
bzr revid: jvo@tinyerp.com-20091026125005-r8jbk8iqhpessa2c
Diffstat (limited to 'bin/tools/misc.py')
| -rw-r--r-- | bin/tools/misc.py | 4 |
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] |
