Author: mtredinnick
Date: 2009-03-08 04:59:43 -0500 (Sun, 08 Mar 2009)
New Revision: 9998

Modified:
   django/trunk/django/core/cache/backends/locmem.py
Log:
Fixed #9626 -- Fixed a deletion race in the locmem cache.

Modified: django/trunk/django/core/cache/backends/locmem.py
===================================================================
--- django/trunk/django/core/cache/backends/locmem.py   2009-03-08 09:59:17 UTC 
(rev 9997)
+++ django/trunk/django/core/cache/backends/locmem.py   2009-03-08 09:59:43 UTC 
(rev 9998)
@@ -96,8 +96,11 @@
 
         self._lock.writer_enters()
         try:
-            del self._cache[key]
-            del self._expire_info[key]
+            try:
+                del self._cache[key]
+                del self._expire_info[key]
+            except KeyError:
+                pass
             return False
         finally:
             self._lock.writer_leaves()


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to