Changeset 6709
- Timestamp:
- 11/21/07 13:54:58 (9 months ago)
- Files:
-
- django/trunk/django/core/cache/backends/locmem.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/core/cache/backends/locmem.py
r6572 r6709 17 17 def add(self, key, value, timeout=None): 18 18 self._lock.writer_enters() 19 # Python 2.3 and 2.4 don't allow combined try-except-finally blocks. 19 20 try: 20 SimpleCacheClass.add(self, key, value, timeout) 21 try: 22 super(CacheClass, self).add(key, pickle.dumps(value), timeout) 23 except pickle.PickleError: 24 pass 21 25 finally: 22 26 self._lock.writer_leaves() … … 50 54 def set(self, key, value, timeout=None): 51 55 self._lock.writer_enters() 56 # Python 2.3 and 2.4 don't allow combined try-except-finally blocks. 52 57 try: 53 58 try:
