projects
/
jinja2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a5900d2
)
Fixed a threading issue with the LRUCache. Still not sure if I should release a...
author
Armin Ronacher
<armin.ronacher@active-4.com>
Mon, 12 Jan 2009 10:08:26 +0000
(11:08 +0100)
committer
Armin Ronacher
<armin.ronacher@active-4.com>
Mon, 12 Jan 2009 10:08:26 +0000
(11:08 +0100)
--HG--
branch : trunk
jinja2/utils.py
patch
|
blob
|
history
diff --git
a/jinja2/utils.py
b/jinja2/utils.py
index 5e31779e4016791769c9e363d82eba29fc347322..1ae38e04a1f43f5d5b97fdc403ae7a1772284fbf 100644
(file)
--- a/
jinja2/utils.py
+++ b/
jinja2/utils.py
@@
-589,7
+589,13
@@
class LRUCache(object):
"""
rv = self._mapping[key]
if self._queue[-1] != key:
- self._remove(key)
+ try:
+ self._remove(key)
+ except:
+ # if something removed the key from the container
+ # when we read, ignore the ValueError that we would
+ # get otherwise.
+ pass
self._append(key)
return rv