Browse Source

If a session is not found , None is now returned instead of an empty dict

Roland Haroutiounian 8 years ago
parent
commit
fd153057df
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      lodel/auth/session.py

+ 2
- 2
lodel/auth/session.py View File

@@ -94,14 +94,14 @@ class SessionStore(ABC):
94 94
 
95 95
     ## @brief gets a session's content
96 96
     # @param sid str : id of the session to read
97
-    # @return dict
97
+    # @return dict | None if no valid session if found
98 98
     def get_session(self, sid):
99 99
         if self.is_session_existing(sid):
100 100
             if not self.has_session_expired(sid):
101 101
                 session = self.read_session(sid)
102 102
             else:
103 103
                 self.delete_session(sid)
104
-                session = {}
104
+                session = None
105 105
         else:
106 106
             raise AuthenticationError("No session file found for the sid %s" % sid)
107 107
 

Loading…
Cancel
Save