Ticket #17810: 17810-catch-all.patch
File 17810-catch-all.patch, 1.6 KB (added by , 13 years ago) |
---|
-
django/contrib/sessions/backends/cached_db.py
24 24 def load(self): 25 25 try: 26 26 data = cache.get(self.cache_key, None) 27 except Exception, e: 28 e_type = str(type(e)) 29 if e_type != "<class 'memcache.MemcachedKeyLengthError'>": 30 raise e 27 except Exception: 28 # Some backends (e.g. memcache) raise an exception on invalid 29 # cache keys. If this happens, reset the session. See #17810. 31 30 data = None 32 31 if data is None: 33 32 data = super(SessionStore, self).load() -
django/contrib/sessions/backends/cache.py
19 19 def load(self): 20 20 try: 21 21 session_data = self._cache.get(self.cache_key, None) 22 except Exception, e: 23 e_type = str(type(e)) 24 if e_type != "<class 'memcache.MemcachedKeyLengthError'>": 25 raise e 22 except Exception: 23 # Some backends (e.g. memcache) raise an exception on invalid 24 # cache keys. If this happens, reset the session. See #17810. 26 25 session_data = None 27 26 if session_data is not None: 28 27 return session_data