The session backend currently dies with an exception if a session that is being deleted doesn't exist in Tokyo Tyrant any more for some reason.
Here's a patch to ignore the error:
diff --git a/tokyo_sessions/tyrant.py b/tokyo_sessions/tyrant.py
index 2152630..22cb54b 100644
--- a/tokyo_sessions/tyrant.py
+++ b/tokyo_sessions/tyrant.py
@@ -62,4 +62,8 @@ class SessionStore(SessionBase):
if self._session_key is None:
return
session_key = self._session_key
- del get_server()[session_key]
\ No newline at end of file
+ try:
+ del get_server()[session_key]
+ except:
+ # Ignore error if session didn't exist in database any more.
+ pass
The session backend currently dies with an exception if a session that is being deleted doesn't exist in Tokyo Tyrant any more for some reason.
Here's a patch to ignore the error: