Skip to content

Commit

Permalink
fixed bug in user cache invalidation: ignores exceptions on token com…
Browse files Browse the repository at this point in the history
…parision (better)
  • Loading branch information
Philippe Faist committed Aug 22, 2014
1 parent 04c278c commit a9b800c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions core/bibusercache.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,14 @@ def validate_item(self, key):
logger.longdebug("Validating item `%s' in `%s', ...", key, self._guess_name_for_dbg())

val = self.dic[key]
if self.tokenchecker.cmp_tokens(key=key, value=val,
oldtoken=self.tokens.get(key,None)):
ok = None
try:
ok = self.tokenchecker.cmp_tokens(key=key, value=val,
oldtoken=self.tokens.get(key,None))
except Exception as e:
logger.debug("%s: Got exception in cmp_tokens(): ignoring and invalidating: %s", key, e)
ok = False
if ok:
if isinstance(val, BibUserCacheDic):
#logger.longdebug("Validating sub-dictionary `%s' ...", key)
val.validate()
Expand Down

0 comments on commit a9b800c

Please sign in to comment.