##// END OF EJS Templates
user-sessions: fix cleanup with corrupted session data.
marcink -
r4483:8eb46532 default
parent child
Show More
@@ -224,7 +224,10 class RedisAuthSessions(BaseAuthSessions
224 data = client.get(key)
224 data = client.get(key)
225 if data:
225 if data:
226 json_data = pickle.loads(data)
226 json_data = pickle.loads(data)
227 accessed_time = json_data['_accessed_time']
227 try:
228 accessed_time = json_data['_accessed_time']
229 except KeyError:
230 accessed_time = 0
228 if accessed_time < expiry_time:
231 if accessed_time < expiry_time:
229 client.delete(key)
232 client.delete(key)
230 deleted_keys += 1
233 deleted_keys += 1
General Comments 0
You need to be logged in to leave comments. Login now