add SlaveError for slave's length

This commit is contained in:
2013-04-19 20:23:34 +02:00
parent 410add6a2a
commit d7b5d9dc16
3 changed files with 10 additions and 9 deletions

View File

@ -250,7 +250,7 @@ class Setting(object):
if opt_or_descr in self._cache:
t = time()
props, raise_text, created = self._cache[opt_or_descr]
if t - created < expires_time:
if t < created:
properties = props
is_cached = True
if not is_cached:
@ -318,7 +318,7 @@ class Setting(object):
def _set_cache(self, opt, props, raise_text):
if self.has_property('expire'):
self._cache[opt] = (props, raise_text, time())
self._cache[opt] = (props, raise_text, time() + expires_time)
def reset_cache(self):
self._cache = {}